From 3a56a8138d06e7e267847caa3f87ef17d657a1fa Mon Sep 17 00:00:00 2001 From: j Date: Tue, 8 Mar 2016 19:51:19 +0530 Subject: [PATCH] only install systemd if /bin/systemctl is available --- update.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/update.py b/update.py index fad499479..74f631224 100755 --- a/update.py +++ b/update.py @@ -73,9 +73,9 @@ def check_services(base): print('Please install init script for "%s" service:' % service) if os.path.exists('/etc/init') and not os.path.exists('/bin/systemctl'): print('\tsudo cp %s/etc/init/%s.conf /etc/init/' % (base, service)) - if os.path.exists('/lib/systemd/system'): + if os.path.exists('/bin/systemctl'): print('\tsudo cp %s/etc/systemd/%s.service /lib/systemd/system/' % (base, service)) - print('sudo systemctl daemon-reload') + print('\tsudo systemctl daemon-reload') print('\tsudo service %s start' % service) print('') @@ -189,9 +189,9 @@ if __name__ == "__main__": print('Please install new init script for "%s" service:' % service) if os.path.exists('/etc/init/%s.conf'%service): print('\tsudo cp %s/etc/init/%s.conf /etc/init/' % (base, service)) - if os.path.exists('/lib/systemd/system'): + if os.path.exists('/bin/systemctl'): print('\tsudo cp %s/etc/systemd/%s.service /lib/systemd/system/' % (base, service)) - print('sudo systemctl daemon-reload') + print('\tsudo systemctl daemon-reload') print('\tsudo service %s restart' % service) if old <= 5432: import pandora.settings @@ -213,9 +213,9 @@ if __name__ == "__main__": print('Please install new init script for "%s" service:' % service) if os.path.exists('/etc/init/%s.conf'%service): print('\tsudo cp %s/etc/init/%s.conf /etc/init/' % (base, service)) - if os.path.exists('/lib/systemd/system'): + if os.path.exists('/bin/systemctl'): print('\tsudo cp %s/etc/systemd/%s.service /lib/systemd/system/' % (base, service)) - print('sudo systemctl daemon-reload') + print('\tsudo systemctl daemon-reload') print('\tsudo service %s restart' % service) else: if len(sys.argv) == 1: