unversary path for vpnbot.service

This commit is contained in:
mercury
2024-03-06 15:15:45 +04:00
parent 3e3684eb34
commit 11e34d8c4e
2 changed files with 3 additions and 2 deletions
+2 -1
View File
@@ -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 enable vpnbot
+1 -1
View File
@@ -5,7 +5,7 @@ After=docker.service
[Service]
Type=oneshot
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"
ExecStartPost=/bin/sh -c "bash ./update/update.sh &"
ExecStop=/bin/sh -c "docker compose down --remove-orphans"