소스 검색

Merge pull request #166 from DuckSoft/master

systemd: prevent restart on corrupt config
Kslr 5 년 전
부모
커밋
aecf59a6df
2개의 변경된 파일2개의 추가작업 그리고 0개의 파일을 삭제
  1. 1 0
      release/config/systemd/system/v2ray.service
  2. 1 0
      release/config/systemd/system/v2ray@.service

+ 1 - 0
release/config/systemd/system/v2ray.service

@@ -10,6 +10,7 @@ AmbientCapabilities=CAP_NET_ADMIN CAP_NET_BIND_SERVICE
 NoNewPrivileges=true
 ExecStart=/usr/local/bin/v2ray -config /usr/local/etc/v2ray/config.json
 Restart=on-failure
+RestartPreventExitStatus=23
 
 [Install]
 WantedBy=multi-user.target

+ 1 - 0
release/config/systemd/system/v2ray@.service

@@ -10,6 +10,7 @@ AmbientCapabilities=CAP_NET_ADMIN CAP_NET_BIND_SERVICE
 NoNewPrivileges=true
 ExecStart=/usr/local/bin/v2ray -config /usr/local/etc/v2ray/%i.json
 Restart=on-failure
+RestartPreventExitStatus=23
 
 [Install]
 WantedBy=multi-user.target