mirror of
https://github.com/Foltik/dotfiles
synced 2024-11-24 04:22:50 -05:00
11 lines
261 B
Python
11 lines
261 B
Python
|
import lib.proc as proc
|
||
|
|
||
|
def enable(unit, user):
|
||
|
flags = (['--user'] if user else []) + ['enable', unit]
|
||
|
output = systemd(flags)
|
||
|
|
||
|
def systemd(flags):
|
||
|
cmd = ['systemctl'] + flags
|
||
|
subproc = proc.exec(cmd)
|
||
|
return proc.communicate(subproc, cmd)
|