fix: restart sslocal on failure

This commit is contained in:
alina 🌸 2024-04-29 21:40:54 +03:00
parent 88c645c1bd
commit f1a15cb968
Signed by: teidesu
SSH key fingerprint: SHA256:uNeCpw6aTSU4aIObXLvHfLkDa82HWH9EiOj9AXOIRpI

View file

@ -70,7 +70,10 @@ in
after = [ "network.target" ];
wantedBy = [ "multi-user.target" ];
path = [ package ] ++ optional (plugin != null) plugin ++ optional (passwordFile != null) pkgs.jq;
serviceConfig.PrivateTmp = true;
serviceConfig = {
PrivateTmp = true;
Restart = "on-failure";
};
script = ''
cp ${configFile} /tmp/shadowsocks.json
${optionalString (passwordFile != null) ''