Remove old daemon commands
This commit is contained in:
parent
03b065c71d
commit
1163ffd146
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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=
|
||||
}
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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=
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue