6.1.0 #48
|
@ -661,11 +661,11 @@ WAN_IP=$(dig +short myip.opendns.com @resolver1.opendns.com)
|
||||||
|
|
||||||
ssl_wa() {
|
ssl_wa() {
|
||||||
if [ "$LE_SSL" = "yes" ]; then
|
if [ "$LE_SSL" = "yes" ]; then
|
||||||
systemctl stop $1
|
systemctl stop $1
|
||||||
letsencrypt certonly --standalone --renew-by-default --agree-tos --email $5 -d $6
|
letsencrypt certonly --standalone --renew-by-default --agree-tos --email $5 -d $6
|
||||||
sed -i "s|/etc/jitsi/meet/$3.crt|/etc/letsencrypt/live/$3/fullchain.pem|" $4
|
sed -i "s|/etc/jitsi/meet/$3.crt|/etc/letsencrypt/live/$3/fullchain.pem|" $4
|
||||||
sed -i "s|/etc/jitsi/meet/$3.key|/etc/letsencrypt/live/$3/privkey.pem|" $4
|
sed -i "s|/etc/jitsi/meet/$3.key|/etc/letsencrypt/live/$3/privkey.pem|" $4
|
||||||
systemctl restart $1
|
systemctl restart $1
|
||||||
#Add cron
|
#Add cron
|
||||||
crontab -l | { cat; echo "@weekly certbot renew --${2} > $LE_RENEW_LOG 2>&1"; } | crontab -
|
crontab -l | { cat; echo "@weekly certbot renew --${2} > $LE_RENEW_LOG 2>&1"; } | crontab -
|
||||||
crontab -l
|
crontab -l
|
||||||
|
|
|
@ -31,9 +31,26 @@ while [ $secs -gt 0 ]; do
|
||||||
: $((secs--))
|
: $((secs--))
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
remove_residuals() {
|
||||||
|
if [ -d $1 ]; then
|
||||||
|
rm -r $1
|
||||||
|
fi
|
||||||
|
}
|
||||||
purge_debconf() {
|
purge_debconf() {
|
||||||
echo PURGE | debconf-communicate $1
|
echo PURGE | debconf-communicate $1
|
||||||
}
|
}
|
||||||
|
remove_services() {
|
||||||
|
systemctl disable $1
|
||||||
|
systemctl stop $1
|
||||||
|
}
|
||||||
|
echo -e '
|
||||||
|
########################################################################
|
||||||
|
Welcome to the Start Over cleaner script
|
||||||
|
########################################################################
|
||||||
|
by Software, IT & Networks Ltd
|
||||||
|
\n'
|
||||||
|
|
||||||
|
SYNC_USER="$(ls /home|awk '/jbsync/{print}')"
|
||||||
|
|
||||||
echo "We are about to remove and clean all the jitsi-meet plaform bits and pieces...
|
echo "We are about to remove and clean all the jitsi-meet plaform bits and pieces...
|
||||||
Please make sure you have backed up anything you don't want to loose."
|
Please make sure you have backed up anything you don't want to loose."
|
||||||
|
@ -62,7 +79,7 @@ if [ "$CONTINUE_PURGE2" = "no" ]; then
|
||||||
exit
|
exit
|
||||||
elif [ "$CONTINUE_PURGE2" = "yes" ]; then
|
elif [ "$CONTINUE_PURGE2" = "yes" ]; then
|
||||||
echo "No going back, lets start..."
|
echo "No going back, lets start..."
|
||||||
wait_seconds 3
|
wait_seconds 5
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
|
@ -78,15 +95,18 @@ apt-get -y purge jibri \
|
||||||
jitsi-videobridge2 \
|
jitsi-videobridge2 \
|
||||||
prosody
|
prosody
|
||||||
|
|
||||||
|
#Services stop
|
||||||
|
remove_services jibri*
|
||||||
|
|
||||||
#Cleaning packages
|
#Cleaning packages
|
||||||
apt-get -y autoremove
|
apt-get -y autoremove
|
||||||
apt-get clean
|
apt-get clean
|
||||||
|
|
||||||
#Removing residual files
|
#Removing residual files
|
||||||
rm -r /etc/jitsi
|
remove_residuals /etc/jitsi
|
||||||
rm -r /opt/jitsi
|
remove_residuals /opt/jitsi
|
||||||
rm -r /usr/share/jicofo
|
remove_residuals /usr/share/jicofo
|
||||||
rm -r /usr/share/jitsi-*
|
remove_residuals /usr/share/jitsi-*
|
||||||
|
|
||||||
#Purging debconf db
|
#Purging debconf db
|
||||||
purge_debconf jicofo
|
purge_debconf jicofo
|
||||||
|
@ -97,4 +117,12 @@ purge_debconf jitsi-meet-turnserver
|
||||||
purge_debconf jitsi-meet-web-config
|
purge_debconf jitsi-meet-web-config
|
||||||
purge_debconf jitsi-videobridge2
|
purge_debconf jitsi-videobridge2
|
||||||
|
|
||||||
|
#Remove unused users
|
||||||
|
if [ ! -z $SYNC_USER ]; then
|
||||||
|
deluser --remove-home $SYNC_USER
|
||||||
|
fi
|
||||||
|
if [ -d /home/jibri ]; then
|
||||||
|
deluser --remove-home jibri
|
||||||
|
fi
|
||||||
|
|
||||||
echo "We are done..."
|
echo "We are done..."
|
||||||
|
|
Loading…
Reference in New Issue