Update selfservice-update.sh

This commit is contained in:
Esteban Mackay Q 2023-01-25 23:51:53 -05:00 committed by GitHub
parent fd0cb7d106
commit 2f323e9eae
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 32 additions and 4 deletions

View File

@ -1,14 +1,42 @@
#!/bin/sh
if [ -f "/var/www/html/tgcount.php" ];
then
sudo systemctl stop apache2
#echo "found file"
else
echo "file not found"
fi
if [ -f "/var/www/html/tgcount.php" ];
then
sudo systemctl disable apache2
#echo "found file"
else
echo "file not found"
fi
if [ -f "/var/www/html/tgcount.php" ];
then
sudo rm /var/www/html/* -r
#echo "found file"
else
echo "file not found"
fi
if [ -d "/var/www/fdmr" ];
then
sudo rm /var/www/fdmr/ -r
#echo "found file"
else
echo "file not found"
fi
sudo systemctl stop fdmr_mon.service
sudo systemctl stop http.server-fmr.service
sudo systemctl disable http.server-fmr.service
sudo rm -r /opt/FDMR-Monitor/
sudo rm -r /var/www/html/*
sudo systemctl stop http.server-fdmr.service
#
systemctl stop apache2
sudo systemctl disable apache2
#
cd /opt
sudo git clone https://github.com/hp3icc/FDMR-Monitor.git
cd FDMR-Monitor