|
|
|
|
@ -1090,7 +1090,7 @@ WantedBy=multi-user.target
|
|
|
|
|
EOF
|
|
|
|
|
|
|
|
|
|
#####################################
|
|
|
|
|
sudo systemctl daemon-reload
|
|
|
|
|
|
|
|
|
|
if systemctl status mariadb.service |grep inactive >/dev/null 2>&1
|
|
|
|
|
then sudo systemctl start mariadb.service
|
|
|
|
|
|
|
|
|
|
@ -1118,46 +1118,7 @@ if ! systemctl status proxy.service | grep "service; enabled;" >/dev/null 2>&1;
|
|
|
|
|
sudo systemctl enable proxy.service
|
|
|
|
|
|
|
|
|
|
fi
|
|
|
|
|
if [ -f "/lib/systemd/system/http.server-fdmr2.service" ];
|
|
|
|
|
then
|
|
|
|
|
echo ""
|
|
|
|
|
#echo "found file"
|
|
|
|
|
else
|
|
|
|
|
cat > /lib/systemd/system/http.server-fdmr2.service <<- "EOFG"
|
|
|
|
|
[Unit]
|
|
|
|
|
Description=PHP http.server.fdmr2
|
|
|
|
|
After=network.target
|
|
|
|
|
|
|
|
|
|
[Service]
|
|
|
|
|
#User=root
|
|
|
|
|
#ExecStartPre=/bin/sleep 30
|
|
|
|
|
# Modify for different other port
|
|
|
|
|
ExecStart=php -S 0.0.0.0:80 -t /var/www/fdmr2/
|
|
|
|
|
Restart=on-failure
|
|
|
|
|
|
|
|
|
|
[Install]
|
|
|
|
|
WantedBy=multi-user.target
|
|
|
|
|
EOFG
|
|
|
|
|
if [ -f "/lib/systemd/system/http.server-fdmr.service" ];
|
|
|
|
|
then
|
|
|
|
|
echo ""
|
|
|
|
|
#echo "found file"
|
|
|
|
|
else
|
|
|
|
|
cat > /lib/systemd/system/http.server-fdmr.service <<- "EOFH"
|
|
|
|
|
[Unit]
|
|
|
|
|
Description=PHP http.server.fdmr
|
|
|
|
|
After=network.target
|
|
|
|
|
|
|
|
|
|
[Service]
|
|
|
|
|
#User=root
|
|
|
|
|
#ExecStartPre=/bin/sleep 30
|
|
|
|
|
# Modify for different other port
|
|
|
|
|
ExecStart=php -S 0.0.0.0:80 -t /var/www/fdmr/
|
|
|
|
|
Restart=on-failure
|
|
|
|
|
|
|
|
|
|
[Install]
|
|
|
|
|
WantedBy=multi-user.target
|
|
|
|
|
EOFH
|
|
|
|
|
variable1=$(grep "Web-Dashboar-Port:" /opt/wdp | grep -Eo '[A.0-9]{1,9}') &&
|
|
|
|
|
if [ -z "$variable1" ]
|
|
|
|
|
then variable1=80
|
|
|
|
|
@ -1207,6 +1168,26 @@ cronjob_editor "$1" "$2" "$3"
|
|
|
|
|
EOFC1
|
|
|
|
|
sudo chmod +x /usr/local/bin/cronedit.sh
|
|
|
|
|
|
|
|
|
|
if [ -f "/lib/systemd/system/http.server-fdmr.service" ];
|
|
|
|
|
then
|
|
|
|
|
echo ""
|
|
|
|
|
#echo "found file"
|
|
|
|
|
else
|
|
|
|
|
cat > /lib/systemd/system/http.server-fdmr.service <<- "EOFH"
|
|
|
|
|
[Unit]
|
|
|
|
|
Description=PHP http.server.fdmr
|
|
|
|
|
After=network.target
|
|
|
|
|
|
|
|
|
|
[Service]
|
|
|
|
|
#User=root
|
|
|
|
|
#ExecStartPre=/bin/sleep 30
|
|
|
|
|
# Modify for different other port
|
|
|
|
|
ExecStart=php -S 0.0.0.0:80 -t /var/www/fdmr/
|
|
|
|
|
Restart=on-failure
|
|
|
|
|
|
|
|
|
|
[Install]
|
|
|
|
|
WantedBy=multi-user.target
|
|
|
|
|
EOFH
|
|
|
|
|
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|