diff --git a/src/freedombone-app-sip b/src/freedombone-app-sip index dd7bfcba..9bebca6a 100755 --- a/src/freedombone-app-sip +++ b/src/freedombone-app-sip @@ -146,7 +146,7 @@ function restore_local_sip { exit 3679 fi rm -rf $temp_restore_dir - service sipwitch restart + systemctl restart sipwitch echo $"Restore of SIP settings complete" fi } @@ -212,7 +212,7 @@ function update_sipwitch_daemon { return fi - service sipwitch stop + systemctl stop sipwitch # remove the original sipwitch daemon if it exists if [ -f /etc/init.d/sipwitch ]; then diff --git a/src/freedombone-app-xmpp b/src/freedombone-app-xmpp index 8a9e8295..5d203348 100755 --- a/src/freedombone-app-xmpp +++ b/src/freedombone-app-xmpp @@ -447,7 +447,7 @@ function restore_local_xmpp { exit 725 fi rm -rf $temp_restore_dir - service prosody restart + systemctl restart prosody chown -R prosody:prosody /var/lib/prosody/* echo $"Restore of xmpp settings complete" fi @@ -472,7 +472,7 @@ function restore_remote_xmpp { exit 725 fi rm -rf $temp_restore_dir - service prosody restart + systemctl restart prosody chown -R prosody:prosody /var/lib/prosody/* echo $"Restore of xmpp settings complete" fi diff --git a/src/freedombone-backup-remote b/src/freedombone-backup-remote index 518492da..97b9712c 100755 --- a/src/freedombone-backup-remote +++ b/src/freedombone-backup-remote @@ -92,7 +92,7 @@ function suspend_site { fi SUSPENDED_SITE="$1" nginx_dissite $SUSPENDED_SITE - service nginx reload + systemctl reload nginx } function restart_site { @@ -101,7 +101,7 @@ function restart_site { return fi nginx_ensite $SUSPENDED_SITE - service nginx reload + systemctl reload nginx SUSPENDED_SITE= } diff --git a/src/freedombone-mesh b/src/freedombone-mesh index 27af7709..b9bcb935 100755 --- a/src/freedombone-mesh +++ b/src/freedombone-mesh @@ -121,28 +121,21 @@ function install_toxcore { sudo cp /tmp/tox-bootstrapd.conf /etc/tox-bootstrapd.conf rm /tmp/tox-bootstrapd.conf - if [ -f /bin/systemctl ]; then - if [ ! -f ~/develop/toxcore/other/bootstrap_daemon/tox-bootstrapd.service ]; then - echo $"File not found ~/develop/toxcore/other/bootstrap_daemon/tox-bootstrapd.service" - exit 7359 - fi - sudo cp ~/develop/toxcore/other/bootstrap_daemon/tox-bootstrapd.service /etc/systemd/system/ - - sudo systemctl daemon-reload - sudo systemctl enable tox-bootstrapd.service - sudo systemctl start tox-bootstrapd.service - if [ ! "$?" = "0" ]; then - sudo systemctl status tox-bootstrapd.service - exit 5846 - fi - - sudo systemctl restart tox-bootstrapd.service - else - sudo cp ~/develop/toxcore/other/bootstrap_daemon/tox-bootstrapd.sh /etc/init.d/tox-bootstrapd - sudo chmod 755 /etc/init.d/tox-bootstrapd - sudo update-rc.d tox-bootstrapd defaults - sudo service tox-bootstrapd start + if [ ! -f ~/develop/toxcore/other/bootstrap_daemon/tox-bootstrapd.service ]; then + echo $"File not found ~/develop/toxcore/other/bootstrap_daemon/tox-bootstrapd.service" + exit 7359 fi + sudo cp ~/develop/toxcore/other/bootstrap_daemon/tox-bootstrapd.service /etc/systemd/system/ + + sudo systemctl daemon-reload + sudo systemctl enable tox-bootstrapd.service + sudo systemctl start tox-bootstrapd.service + if [ ! "$?" = "0" ]; then + sudo systemctl status tox-bootstrapd.service + exit 5846 + fi + + sudo systemctl restart tox-bootstrapd.service TOX_PUBLIC_KEY=$(cat /var/log/syslog | grep tox | grep "Public Key" | awk -F ' ' '{print $8}' | tail -1) if [ ${#TOX_PUBLIC_KEY} -lt 30 ]; then diff --git a/src/freedombone-renew-cert b/src/freedombone-renew-cert index 16e02afd..81cf27bb 100755 --- a/src/freedombone-renew-cert +++ b/src/freedombone-renew-cert @@ -135,7 +135,7 @@ function renew_startssl { sed -i "s|$HOSTNAME.crt|$HOSTNAME.bundle.crt|g" /etc/nginx/sites-available/$HOSTNAME echo $'Certificate installed' - service nginx restart + systemctl restart nginx return fi diff --git a/src/freedombone-restore-local b/src/freedombone-restore-local index 4fcacbd8..01c474b1 100755 --- a/src/freedombone-restore-local +++ b/src/freedombone-restore-local @@ -205,7 +205,7 @@ function restore_mariadb { exit 962 fi echo $"Restarting database" - service mysql restart + systemctl restart mysql echo $"Change the MariaDB password to the backup version" DATABASE_PASSWORD="$db_pass" ${PROJECT_NAME}-pass -u root -a mariadb -p "$DATABASE_PASSWORD" diff --git a/src/freedombone-restore-remote b/src/freedombone-restore-remote index 232d9903..5aa8d1e0 100755 --- a/src/freedombone-restore-remote +++ b/src/freedombone-restore-remote @@ -198,7 +198,7 @@ function restore_mariadb { exit 962 fi echo $"Restarting database" - service mysql restart + systemctl restart mysql echo $"Change the MariaDB password to the backup version" DATABASE_PASSWORD="$db_pass" ${PROJECT_NAME}-pass -u root -a mariadb -p "$DATABASE_PASSWORD" diff --git a/src/freedombone-utils-backup b/src/freedombone-utils-backup index b2e74782..44f9071a 100755 --- a/src/freedombone-utils-backup +++ b/src/freedombone-utils-backup @@ -35,7 +35,7 @@ function suspend_site { # suspends a given website SUSPENDED_SITE="$1" nginx_dissite $SUSPENDED_SITE - service nginx reload + systemctl reload nginx } function restart_site { @@ -44,7 +44,7 @@ function restart_site { return fi nginx_ensite $SUSPENDED_SITE - service nginx reload + systemctl reload nginx SUSPENDED_SITE= }