View Single Post
SubCore's Avatar
Posts: 850 | Thanked: 626 times | Joined on Sep 2009 @ Vienna, Austria
#7
to start a script as root, you could use
Code:
echo /path/to/script | sudo gainroot

or

/bin/busybox sh -c 'echo /path/to/script | sudo gainroot'
that script can be a shell script, python or anything else, as long as the executable flag (+x) is set.

(and just to mention it - there really is no point in using python if all you're doing are calls to os.system, better just use a shell script for that.)
__________________
"What we perceive is not nature itself, but nature exposed to our method of questioning."
-- Werner Karl Heisenberg
 

The Following 2 Users Say Thank You to SubCore For This Useful Post: