feat: replace systemctl commands with service equivalents

for sake of installing to devuan instead of debian, although the
latter should still work okay iiuc..
This commit is contained in:
Lance Edgar 2026-06-06 16:13:21 -05:00
parent 1c7883393b
commit 1d2d4697ec
6 changed files with 9 additions and 9 deletions

View file

@ -146,18 +146,18 @@ def restart(c):
"""
Restart the Apache web service
"""
c.sudo('systemctl restart apache2.service')
c.sudo("service apache2 restart")
def stop(c):
"""
Stop the Apache web service
"""
c.sudo('systemctl stop apache2.service')
c.sudo("service apache2 stop")
def start(c):
"""
Start the Apache web service
"""
c.sudo('systemctl start apache2.service')
c.sudo("service apache2 start")

View file

@ -59,7 +59,7 @@ def restart(c):
"""
Restart the collectd service.
"""
c.sudo('systemctl restart collectd')
c.sudo("service collectd restart")
def deploy_mountpoint_check_script(c, dest, **kwargs):

View file

@ -66,7 +66,7 @@ def restart(c):
"""
Restart the MySQL database service
"""
c.sudo('systemctl restart mysql.service')
c.sudo("service mysql restart")
def user_exists(c, name, host='localhost'):

View file

@ -62,7 +62,7 @@ def restart(c):
"""
Restart the Postfix mail service
"""
c.sudo('systemctl restart postfix.service')
c.sudo("service postfix restart")
def set_config(c, setting, value):

View file

@ -93,14 +93,14 @@ def restart(c):
"""
Restart the PostgreSQL database service
"""
c.sudo('systemctl restart postgresql.service')
c.sudo("service postgresql restart")
def reload_(c):
"""
Reload config for the PostgreSQL database service
"""
c.sudo('systemctl reload postgresql.service')
c.sudo("service postgresql reload")
# TODO: deprecate / remove this
reload = reload_

View file

@ -65,7 +65,7 @@ def restart(c):
"""
Restart the OpenSSH service
"""
c.sudo('systemctl restart ssh.service')
c.sudo("service ssh restart")
def configure(c, allow_root=False):