From f1a15cb968b584d2f318cad37e2b5dbc8d2520c0 Mon Sep 17 00:00:00 2001 From: teidesu Date: Mon, 29 Apr 2024 21:40:54 +0300 Subject: [PATCH] fix: restart sslocal on failure --- services/shadowsocks-rust.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/services/shadowsocks-rust.nix b/services/shadowsocks-rust.nix index ec6a48e..ed22ce3 100755 --- a/services/shadowsocks-rust.nix +++ b/services/shadowsocks-rust.nix @@ -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) ''