Check if sydent was installed

This commit is contained in:
Bob Mottram 2017-02-07 16:03:45 +00:00
parent 18ec448cad
commit 3c58c76dca
1 changed files with 15 additions and 9 deletions

View File

@ -170,7 +170,9 @@ function matrix_nginx {
systemctl restart nginx systemctl restart nginx
systemctl restart turn systemctl restart turn
systemctl restart matrix systemctl restart matrix
systemctl restart sydent if [ -f /etc/systemd/system/sydent.service ]; then
systemctl restart sydent
fi
# wait for nginx to start otherwise user add fails later # wait for nginx to start otherwise user add fails later
sleep 5 sleep 5
@ -482,27 +484,31 @@ function remove_matrix {
firewall_remove ${MATRIX_HTTP_PORT} firewall_remove ${MATRIX_HTTP_PORT}
systemctl stop matrix systemctl stop matrix
systemctl stop sydent if [ -f /etc/systemd/system/sydent.service ]; then
systemctl stop sydent
fi
function_check remove_turn function_check remove_turn
remove_turn remove_turn
systemctl disable matrix systemctl disable matrix
systemctl disable sydent if [ -f /etc/systemd/system/sydent.service ]; then
systemctl disable sydent
rm /etc/systemd/system/sydent.service
fi
if [ -f /etc/systemd/system/matrix.service ]; then if [ -f /etc/systemd/system/matrix.service ]; then
rm /etc/systemd/system/matrix.service rm /etc/systemd/system/matrix.service
fi fi
if [ -f /etc/systemd/system/sydent.service ]; then
rm /etc/systemd/system/sydent.service
fi
apt-get -y remove --purge coturn apt-get -y remove --purge coturn
cd /etc/matrix cd /etc/matrix
pip uninstall . pip uninstall .
cd /etc/sydent if [ -d /etc/sydent ]; then
pip uninstall . cd /etc/sydent
pip uninstall .
rm -rf /etc/sydent
fi
rm -rf $MATRIX_DATA_DIR rm -rf $MATRIX_DATA_DIR
rm -rf /etc/matrix rm -rf /etc/matrix
rm -rf /etc/sydent
deluser matrix deluser matrix
delgroup matrix delgroup matrix
remove_onion_service matrix ${MATRIX_ONION_PORT} remove_onion_service matrix ${MATRIX_ONION_PORT}