From 3ac317723673a25582bde9388817185508e2397d Mon Sep 17 00:00:00 2001 From: Adithya Nair Date: Mon, 29 May 2023 23:20:18 +0530 Subject: [PATCH] update frpc service --- hosts/rico2/services/frpc.nix | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/hosts/rico2/services/frpc.nix b/hosts/rico2/services/frpc.nix index d457cae..dc60c59 100644 --- a/hosts/rico2/services/frpc.nix +++ b/hosts/rico2/services/frpc.nix @@ -4,12 +4,15 @@ in { systemd.services.frpc = { enable = true; description = "FRP Client"; - wantedBy = ["multi-user.target"]; + after = ["network.target"]; requires = ["network.target"]; - path = [ - pkgs.frp - ]; - script = "frpc -c /etc/frp/frpc.ini"; + wantedBy = ["multi-user.target"]; + serviceConfig = { + Type="simple"; + ExecStart="${pkgs.frp}/bin/frpc -c /etc/frp/frpc.ini"; + Restart="always"; + RestartSec="5s"; + }; }; environment.etc."frp/frpc.ini".text = '' [common]