![]() |
2012-10-21
, 08:25
|
Moderator |
Posts: 6,215 |
Thanked: 6,400 times |
Joined on Nov 2011
|
#822
|
![]() |
2012-10-21
, 09:09
|
Posts: 233 |
Thanked: 491 times |
Joined on Oct 2011
@ Sydney
|
#823
|
ProfileMatic runs as user. So if you need some custom action to run as "root", you'll need to figure out how to invoke the command from script using "devel-su". I seem to remember it's possible, but I don't remember the details.
#!/bin/sh
echo rootpassword | devel-su -c command
The Following 2 Users Say Thank You to MFaroTusino For This Useful Post: | ||
![]() |
2012-10-21
, 09:17
|
|
Posts: 5,339 |
Thanked: 4,133 times |
Joined on Jan 2010
@ Israel
|
#824
|
The Following User Says Thank You to Schturman For This Useful Post: | ||
![]() |
2012-10-22
, 05:56
|
|
Posts: 319 |
Thanked: 221 times |
Joined on Jan 2010
@ Finland
|
#825
|
#!/bin/sh echo rootme | devel-su -c "/sbin/stop bme" sleep 10; echo rootme | devel-su -c "/sbin/start bme" exit 0;
The Following 6 Users Say Thank You to rooster13 For This Useful Post: | ||
![]() |
2012-10-22
, 10:58
|
Posts: 1,313 |
Thanked: 2,978 times |
Joined on Jun 2011
@ Finland
|
#826
|
I succesfully solved the sudden battery drop with this piece of script:
But now how to run this when the drop occurs? There is no battery percentage check in ProfileMatic.Code:#!/bin/sh echo rootme | devel-su -c "/sbin/stop bme" sleep 10; echo rootme | devel-su -c "/sbin/start bme" exit 0;
Any chance getting it there?
Since this only works when the drop is in effect, does nothing if you run it before the drop occurs.
I also tested the restart bme and that did not seem to work.
The Following 3 Users Say Thank You to ajalkane For This Useful Post: | ||
![]() |
2012-10-22
, 11:05
|
|
Posts: 319 |
Thanked: 221 times |
Joined on Jan 2010
@ Finland
|
#827
|
That's a good reason to add battery level condition to ProfileMatic. I'll look into it.
![]() |
2012-10-22
, 16:07
|
Posts: 1,313 |
Thanked: 2,978 times |
Joined on Jun 2011
@ Finland
|
#828
|
![]() |
2012-10-25
, 02:27
|
Moderator |
Posts: 6,215 |
Thanked: 6,400 times |
Joined on Nov 2011
|
#829
|
![]() |
2012-10-25
, 16:03
|
Posts: 30 |
Thanked: 25 times |
Joined on Jul 2012
|
#830
|
Lausanne & Lyon de descente...
----------------
Schturman's home page
Schturman's repo on openrepos
RPM packaging directly on your Jolla phone.
Root & User SSH access to Jolla via WinSCP.
Root and User SSH access to Jolla via Nautilus on Linux PC.