diff --git a/update.sh b/update.sh
index e291237..e4d4f75 100644
--- a/update.sh
+++ b/update.sh
@@ -1016,29 +1016,6 @@ fi
# service update
############################################################
-cat > /lib/systemd/system/fdmr_mon2.service <<- "EOF"
-[Unit]
-Description=FDMR Monitor2
-# To make the network-online.target available
-# systemctl enable systemd-networkd-wait-online.service
-#After=network-online.target syslog.target
-#Wants=network-online.target
-
-[Service]
-#User=root
-#Type=simple
-#Restart=always
-#RestartSec=3
-#StandardOutput=null
-WorkingDirectory=/opt/FDMR-Monitor2
-ExecStart=python3 /opt/FDMR-Monitor2/monitor.py
-#Restart=on-abort
-Restart=on-failure
-
-[Install]
-WantedBy=multi-user.target
-
-EOF
cat > /lib/systemd/system/http.server-fdmr2.service <<- "EOFH"
[Unit]
Description=PHP http.server.fdmr2
@@ -1088,7 +1065,7 @@ sed -i "s/test/selfcare/g" /opt/FDMR-Monitor2/fdmr-mon_SAMPLE.cfg
sed -i "s/PRIVATE_NETWORK = True/PRIVATE_NETWORK = False/g" /opt/FDMR-Monitor2/fdmr-mon_SAMPLE.cfg
sed -i "s/SUBSCRIBER_FILE =.*/SUBSCRIBER_FILE = subscriber_ids.csv/g" /opt/FDMR-Monitor2/fdmr-mon_SAMPLE.cfg
sed -i "s/FILES_PATH =.*/FILES_PATH = \/opt\/FDMR-Monitor2\/data/g" /opt/FDMR-Monitor2/fdmr-mon_SAMPLE.cfg
-
+sed -i "s/configFile =.*/configFile = '\/opt\/FDMR-Monitor2\/fdmr-mon.cfg';/g" /opt/FDMR-Monitor2/html/config.php
sed -i "s/with.*/with FDMR-Monitor2<\/a> by CS8ABG<\/a> , Proyect: FDMR+<\/a><\/div>/g" /opt/FDMR-Monitor2/html/include/footer.php
sed -i "s/#fff/#d1d1d1/g" /opt/FDMR-Monitor2/html/plugins/adminlte/css/adminlte.min.css
sed -i "s/f8f9fa/d0d0d0/g" /opt/FDMR-Monitor2/html/plugins/adminlte/css/adminlte.min.css
@@ -1115,8 +1092,16 @@ sed -i "s/ExecStart=.*/ExecStart=python3 \/opt\/FDMR-Monitor2\/monitor.py/g" /op
sudo cp /opt/FDMR-Monitor2/utils/logrotate/fdmr_mon2 /etc/logrotate.d/fdmr_mon2
-#sudo cp /opt/FDMR-Monitor2/utils/systemd/fdmr_mon2.service /lib/systemd/system/fdmr_mon2.service
+sudo cp /opt/FDMR-Monitor2/utils/systemd/fdmr_mon2.service /lib/systemd/system/fdmr_mon2.service
+
+if systemctl status mariadb.service |grep inactive >/dev/null 2>&1
+then sudo systemctl start mariadb.service
+
+fi
+if systemctl status mariadb.service |grep disable >/dev/null 2>&1
+then sudo systemctl enable mariadb.service
+fi
if [ -f "mon.db" ]
then
rm mon.db
@@ -1134,14 +1119,7 @@ python3 mon_db.py --update
#####################################
-if systemctl status mariadb.service |grep inactive >/dev/null 2>&1
-then sudo systemctl start mariadb.service
-
-fi
-if systemctl status mariadb.service |grep disable >/dev/null 2>&1
-then sudo systemctl enable mariadb.service
-fi
if systemctl status http.server-fdmr.service |grep "service; enabled;" >/dev/null 2>&1
then sudo systemctl disable http.server-fdmr.service
@@ -1166,9 +1144,9 @@ variable1=$(grep "Web-Dashboar-Port:" /opt/wdp | grep -Eo '[A.0-9]{1,9}') &&
if [ -z "$variable1" ]
then variable1=80
-fi &&
-sudo sed -i "s/ExecStart=.*/ExecStart=php -S 0.0.0.0:$variable1 -t \/var\/www\/fdmr\//g" /lib/systemd/system/http.server-fdmr.service &&
-sudo sed -i "s/ExecStart=.*/ExecStart=php -S 0.0.0.0:$variable1 -t \/var\/www\/fdmr2\//g" /lib/systemd/system/http.server-fdmr2.service &&
+fi
+sudo sed -i "s/ExecStart=.*/ExecStart=php -S 0.0.0.0:$variable1 -t \/var\/www\/fdmr\//g" /lib/systemd/system/http.server-fdmr.service
+sudo sed -i "s/ExecStart=.*/ExecStart=php -S 0.0.0.0:$variable1 -t \/var\/www\/fdmr2\//g" /lib/systemd/system/http.server-fdmr2.service
systemctl daemon-reload &&
systemctl start fdmr_mon2.service