mirror of
https://github.com/Websoft9/websoft9.git
synced 2024-11-25 09:00:26 +00:00
systemd
This commit is contained in:
parent
d1d7ba15ad
commit
28c8bdb6a8
3 changed files with 7 additions and 7 deletions
|
@ -9,7 +9,7 @@ set -e
|
||||||
container_name="websoft9-apphub"
|
container_name="websoft9-apphub"
|
||||||
|
|
||||||
# 最大尝试次数
|
# 最大尝试次数
|
||||||
max_attempts=60
|
max_attempts=6
|
||||||
|
|
||||||
# 获取容器的内网IP
|
# 获取容器的内网IP
|
||||||
attempt=0
|
attempt=0
|
||||||
|
@ -21,7 +21,7 @@ while [ $attempt -lt $max_attempts ]; do
|
||||||
fi
|
fi
|
||||||
|
|
||||||
attempt=$(( $attempt + 1 ))
|
attempt=$(( $attempt + 1 ))
|
||||||
sleep 1
|
sleep 5
|
||||||
done
|
done
|
||||||
|
|
||||||
# 检查获取IP是否成功
|
# 检查获取IP是否成功
|
||||||
|
|
|
@ -1,6 +1,4 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# 在这个脚本中,我们将运行两个脚本
|
|
||||||
/bin/bash send_credentials.sh
|
/bin/bash send_credentials.sh
|
||||||
/bin/bash set_hosts.sh
|
/bin/bash set_hosts.sh
|
||||||
tail -f /dev/null
|
|
|
@ -1,15 +1,17 @@
|
||||||
[Unit]
|
[Unit]
|
||||||
Description=Websoft9 PaaS Platform
|
Description=Websoft9 Linux AppStore
|
||||||
Requires=network.target docker
|
Requires=network.target docker
|
||||||
After=network.target docker
|
After=network.target docker
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
WorkingDirectory=/opt/websoft9/systemd
|
WorkingDirectory=/opt/websoft9/systemd
|
||||||
ExecStart=/bin/bash /opt/websoft9/systemd/start_up.sh
|
ExecStart=/bin/bash /opt/websoft9/systemd/start_up.sh
|
||||||
Restart=always
|
Restart=on-failure
|
||||||
Type=simple
|
Type=simple
|
||||||
NotifyAccess=all
|
NotifyAccess=all
|
||||||
StandardError=syslog
|
StandardError=syslog
|
||||||
|
User=root
|
||||||
|
Group=root
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
Loading…
Reference in a new issue