mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-11-29 08:25:10 +00:00
Moved privilegedactions to the actions directory.
This commit is contained in:
1 parent
025c2aebc1
commit
4d529b7585
4 files changed
+9
-8
No files matched your search
@@ -0,0 +1,15 @@
|
||||
import sys
|
||||
import subprocess
|
||||
import cfg
|
||||
|
||||
def privilegedaction_run(action, options):
|
||||
cmd = ['sudo', '-n', "/usr/share/plinth/actions/%s" % action]
|
||||
if options:
|
||||
cmd.extend(options)
|
||||
cfg.log.info('running: %s ' % ' '.join(cmd))
|
||||
|
||||
output, error = \
|
||||
subprocess.Popen(cmd,
|
||||
stdout = subprocess.PIPE,
|
||||
stderr= subprocess.PIPE).communicate()
|
||||
return output, error
|
||||
Reference in new issue
Block a user