diff --git a/apps/roles/mingdao/files/mingdao.service b/apps/roles/mingdao/files/mingdao.service deleted file mode 100644 index 30404508..00000000 --- a/apps/roles/mingdao/files/mingdao.service +++ /dev/null @@ -1,9 +0,0 @@ -[Unit] -Description=mingdao service -After=network.target -[Service] -Type=simple -ExecStart=/bin/bash /data/apps/mingdao/installer/service.sh start -ExecStop=-/usr/bin/pkill mingdaoyun -[Install] -WantedBy=multi-user.target diff --git a/apps/roles/mingdao/files/sys.sh b/apps/roles/mingdao/files/sys.sh new file mode 100644 index 00000000..ba5bcf2a --- /dev/null +++ b/apps/roles/mingdao/files/sys.sh @@ -0,0 +1,13 @@ +#!/bin/bash + +if [[ -f /usr/local/MDPrivateDeployment/first ]];then + rm -rf /data/mingdao/ + /bin/rm -f /usr/local/MDPrivateDeployment/first + /bin/bash /usr/local/MDPrivateDeployment/service.sh stopall + /bin/bash /usr/local/MDPrivateDeployment/service.sh start +else + sleep 30 + docker system prune -f + /bin/bash /usr/local/MDPrivateDeployment/service.sh stopall + /bin/bash /usr/local/MDPrivateDeployment/service.sh startall +fi