From 2f323e9eaeb96314949a21317cc3611b5f60d420 Mon Sep 17 00:00:00 2001 From: Esteban Mackay Q <49044505+hp3icc@users.noreply.github.com> Date: Wed, 25 Jan 2023 23:51:53 -0500 Subject: [PATCH] Update selfservice-update.sh --- selfservice-update.sh | 36 ++++++++++++++++++++++++++++++++---- 1 file changed, 32 insertions(+), 4 deletions(-) diff --git a/selfservice-update.sh b/selfservice-update.sh index 1a540da..c73015a 100644 --- a/selfservice-update.sh +++ b/selfservice-update.sh @@ -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