Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 11e34d8c4e | |||
| 3e3684eb34 | |||
| 7ee47db8e2 | |||
| b390fe7dd8 |
+2
-2
@@ -2232,7 +2232,7 @@ DNS-over-HTTPS with IP:
|
||||
if (!empty($v['# PublicKey'])) {
|
||||
$conf['peers'][$k]['online'] = 'off';
|
||||
} else {
|
||||
$conf['peers'][$k]['status'] = $this->getStatusPeer($v['PublicKey'], $status['peers']);
|
||||
$conf['peers'][$k]['status'] = $status ? $this->getStatusPeer($v['PublicKey'], $status['peers']) : 'error';
|
||||
$conf['peers'][$k]['online'] = preg_match('~^(\d+ seconds|[12] minute)~', $conf['peers'][$k]['status']['latest handshake']) ? 'online' : '';
|
||||
}
|
||||
}
|
||||
@@ -2587,7 +2587,7 @@ DNS-over-HTTPS with IP:
|
||||
if ($clients) {
|
||||
$name = $this->getName($clients[$client]['interface']);
|
||||
$conf = $this->createConfig($clients[$client]);
|
||||
if ($this->getInstanceWG(1)) {
|
||||
if ($this->getWGType() == 'awg') {
|
||||
$sl = $this->getAmneziaShortLink($clients[$client]);
|
||||
}
|
||||
return [
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -3,10 +3,13 @@ Description=VPN: Docker Compose Application Service
|
||||
Requires=docker.service
|
||||
After=docker.service
|
||||
[Service]
|
||||
WorkingDirectory=/root/vpnbot
|
||||
ExecStart=/bin/sh -c "IP=$(curl https://ipinfo.io/ip) VER=$(git describe --tags) docker compose up -d --force-recreate && bash ./update/update.sh &"
|
||||
ExecStop=/bin/sh -c "kill -9 $(cat ./update/update_pid) > /dev/null && docker compose down --remove-orphans"
|
||||
Type=oneshot
|
||||
RemainAfterExit=yes
|
||||
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"
|
||||
ExecStopPost=/bin/sh -c "kill -9 $(cat ./update/update_pid) > /dev/null"
|
||||
TimeoutStartSec=0
|
||||
Restart=on-failure
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
||||
Reference in New Issue
Block a user