mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-05-20 10:34:30 +00:00
action_utils: Update outdated docstrings
- We no longer support sysvinit. Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org> Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
parent
4e54196c82
commit
4a34feefb0
@ -86,13 +86,13 @@ def service_is_enabled(service_name, strict_check=False):
|
|||||||
|
|
||||||
|
|
||||||
def service_enable(service_name):
|
def service_enable(service_name):
|
||||||
"""Enable and start a service in systemd and sysvinit using update-rc.d."""
|
"""Enable and start a service in systemd."""
|
||||||
subprocess.call(['systemctl', 'enable', service_name])
|
subprocess.call(['systemctl', 'enable', service_name])
|
||||||
service_start(service_name)
|
service_start(service_name)
|
||||||
|
|
||||||
|
|
||||||
def service_disable(service_name):
|
def service_disable(service_name):
|
||||||
"""Disable and stop service in systemd and sysvinit using update-rc.d."""
|
"""Disable and stop service in systemd."""
|
||||||
subprocess.call(['systemctl', 'disable', service_name])
|
subprocess.call(['systemctl', 'disable', service_name])
|
||||||
try:
|
try:
|
||||||
service_stop(service_name)
|
service_stop(service_name)
|
||||||
@ -111,27 +111,27 @@ def service_unmask(service_name):
|
|||||||
|
|
||||||
|
|
||||||
def service_start(service_name):
|
def service_start(service_name):
|
||||||
"""Start a service with systemd or sysvinit."""
|
"""Start a service with systemd."""
|
||||||
service_action(service_name, 'start')
|
service_action(service_name, 'start')
|
||||||
|
|
||||||
|
|
||||||
def service_stop(service_name):
|
def service_stop(service_name):
|
||||||
"""Stop a service with systemd or sysvinit."""
|
"""Stop a service with systemd."""
|
||||||
service_action(service_name, 'stop')
|
service_action(service_name, 'stop')
|
||||||
|
|
||||||
|
|
||||||
def service_restart(service_name):
|
def service_restart(service_name):
|
||||||
"""Restart a service with systemd or sysvinit."""
|
"""Restart a service with systemd."""
|
||||||
service_action(service_name, 'restart')
|
service_action(service_name, 'restart')
|
||||||
|
|
||||||
|
|
||||||
def service_try_restart(service_name):
|
def service_try_restart(service_name):
|
||||||
"""Try to restart a service with systemd or sysvinit."""
|
"""Try to restart a service with systemd."""
|
||||||
service_action(service_name, 'try-restart')
|
service_action(service_name, 'try-restart')
|
||||||
|
|
||||||
|
|
||||||
def service_reload(service_name):
|
def service_reload(service_name):
|
||||||
"""Reload a service with systemd or sysvinit."""
|
"""Reload a service with systemd."""
|
||||||
service_action(service_name, 'reload')
|
service_action(service_name, 'reload')
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user