Update and rename mingdao.service to sys.sh

This commit is contained in:
qiaofeng1227 2023-03-01 15:26:41 +08:00 committed by GitHub
parent 1959c785b1
commit df17f46f63
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 9 deletions

View File

@ -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

View File

@ -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