unversary path for vpnbot.service
This commit is contained in:
@@ -1,3 +1,4 @@
|
|||||||
cp scripts/vpnbot.service /etc/systemd/system/vpnbot.service
|
path=`pwd`
|
||||||
|
sed "s|path|$path|g" "$path/scripts/vpnbot.service" > /etc/systemd/system/vpnbot.service
|
||||||
systemctl daemon-reload
|
systemctl daemon-reload
|
||||||
systemctl enable vpnbot
|
systemctl enable vpnbot
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ After=docker.service
|
|||||||
[Service]
|
[Service]
|
||||||
Type=oneshot
|
Type=oneshot
|
||||||
RemainAfterExit=yes
|
RemainAfterExit=yes
|
||||||
WorkingDirectory=/root/vpnbot
|
WorkingDirectory=path
|
||||||
ExecStart=/bin/sh -c "IP=$(curl https://ipinfo.io/ip) VER=$(git describe --tags) docker compose up -d --force-recreate"
|
ExecStart=/bin/sh -c "IP=$(curl https://ipinfo.io/ip) VER=$(git describe --tags) docker compose up -d --force-recreate"
|
||||||
ExecStartPost=/bin/sh -c "bash ./update/update.sh &"
|
ExecStartPost=/bin/sh -c "bash ./update/update.sh &"
|
||||||
ExecStop=/bin/sh -c "docker compose down --remove-orphans"
|
ExecStop=/bin/sh -c "docker compose down --remove-orphans"
|
||||||
|
|||||||
Reference in New Issue
Block a user