From e7e5243f09e79b5f2b09d2a4f0d358d192a9e469 Mon Sep 17 00:00:00 2001 From: Sense T Date: Sat, 1 Mar 2025 10:48:17 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20inode-client=20systemd=20?= =?UTF-8?q?=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- h3c/inode-client/module.nix | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/h3c/inode-client/module.nix b/h3c/inode-client/module.nix index 2f52202..e76ffaa 100644 --- a/h3c/inode-client/module.nix +++ b/h3c/inode-client/module.nix @@ -23,19 +23,20 @@ in environment.etc."iNode/inodesys.conf".source = "${cfg.package}/etc/iNode/inodesys.conf"; environment.systemPackages = [ cfg.package ]; - systemd.services.h3c-inode-client = { - #wantedBy = [ - # "network-online.target" - # "graphical.target" - #]; - after = [ "network-online.target" ]; - serviceConfig = { - Type = "simple"; - RemainAfterExit = "yes"; - ExecStartPre = "${cfg.package}/bin/setup"; - ExecStart = "${cfg.package}/bin/AuthenMngService"; - ExecStop = "${cfg.package}/bin/AuthenMngService -k"; + systemd.services.h3c-inode-client = + let + target = "network-online.target"; + in + { + wants = [ target ]; + after = [ target ]; + serviceConfig = { + Type = "simple"; + RemainAfterExit = "yes"; + ExecStartPre = "${cfg.package}/bin/setup"; + ExecStart = "${cfg.package}/bin/AuthenMngService"; + ExecStop = "${cfg.package}/bin/AuthenMngService -k"; + }; }; - }; }; }