hans, iodine: correct script
This commit is contained in:
parent
276d10dae6
commit
33c34aff2f
@ -115,18 +115,10 @@ in
|
||||
description = "hans client - ${name}";
|
||||
after = [ "network.target" ];
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
preStart = ''
|
||||
cat > /run/hans/${name}-script << EOF
|
||||
#!/bin/sh
|
||||
${pkgs.hans}/bin/hans -f -u ${hansUser} ${cfg.extraConfig} -c ${cfg.server} ${optionalString (cfg.passwordFile != "") "-p $(cat \"${cfg.passwordFile}\")"}
|
||||
EOF
|
||||
chmod 700 /run/hans/${name}-script
|
||||
'';
|
||||
script = "/run/hans/${name}-script";
|
||||
script = "${pkgs.hans}/bin/hans -f -u ${hansUser} ${cfg.extraConfig} -c ${cfg.server} ${optionalString (cfg.passwordFile != "") "-p $(cat \"${cfg.passwordFile}\")"}";
|
||||
serviceConfig = {
|
||||
RestartSec = "30s";
|
||||
Restart = "always";
|
||||
RuntimeDirectory = [ "hans" ];
|
||||
};
|
||||
};
|
||||
in
|
||||
@ -139,15 +131,7 @@ in
|
||||
description = "hans, ip over icmp server daemon";
|
||||
after = [ "network.target" ];
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
preStart = ''
|
||||
cat > /run/hans/script << EOF
|
||||
#!/bin/sh
|
||||
${pkgs.hans}/bin/hans -f -u ${hansUser} ${cfg.server.extraConfig} -s ${cfg.server.ip} ${optionalString cfg.server.systemPings "-r"} ${optionalString (cfg.passwordFile != "") "-p $(cat \"${cfg.passwordFile}\")"}
|
||||
EOF
|
||||
chmod 700 /run/hans/script
|
||||
'';
|
||||
script = "/run/hans/script";
|
||||
serviceConfig.RuntimeDirectory = [ "hans" ];
|
||||
script = "${pkgs.hans}/bin/hans -f -u ${hansUser} ${cfg.server.extraConfig} -s ${cfg.server.ip} ${optionalString cfg.server.systemPings "-r"} ${optionalString (cfg.passwordFile != "") "-p $(cat \"${cfg.passwordFile}\")"}";
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -120,18 +120,10 @@ in
|
||||
description = "iodine client - ${name}";
|
||||
after = [ "network.target" ];
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
preStart = ''
|
||||
cat > /run/iodine/${name}-script << EOF
|
||||
#!/bin/sh
|
||||
${pkgs.iodine}/bin/iodine -f -u ${iodinedUser} ${cfg.extraConfig} ${optionalString (cfg.passwordFile != "") "-P $(cat \"${cfg.passwordFile}\")"} ${cfg.relay} ${cfg.server}
|
||||
EOF
|
||||
chmod 700 /run/iodine/${name}-script
|
||||
'';
|
||||
script = "/run/iodine/${name}-script";
|
||||
script = "${pkgs.iodine}/bin/iodine -f -u ${iodinedUser} ${cfg.extraConfig} ${optionalString (cfg.passwordFile != "") "-P $(cat \"${cfg.passwordFile}\")"} ${cfg.relay} ${cfg.server}";
|
||||
serviceConfig = {
|
||||
RestartSec = "30s";
|
||||
Restart = "always";
|
||||
RuntimeDirectory = [ "iodine" ];
|
||||
};
|
||||
};
|
||||
in
|
||||
@ -144,15 +136,7 @@ in
|
||||
description = "iodine, ip over dns server daemon";
|
||||
after = [ "network.target" ];
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
preStart = ''
|
||||
cat > /run/iodined/script << EOF
|
||||
#!/bin/sh
|
||||
${pkgs.iodine}/bin/iodined -f -u ${iodinedUser} ${cfg.server.extraConfig} ${optionalString (cfg.passwordFile != "") "-P $(cat \"${cfg.passwordFile}\")"} ${cfg.server.ip} ${cfg.server.domain}
|
||||
EOF
|
||||
chmod 700 /run/iodined/script
|
||||
'';
|
||||
script = "/run/iodined/script";
|
||||
serviceConfig.RuntimeDirectory = [ "iodined" ];
|
||||
script = "${pkgs.iodine}/bin/iodined -f -u ${iodinedUser} ${cfg.server.extraConfig} ${optionalString (cfg.passwordFile != "") "-P $(cat \"${cfg.passwordFile}\")"} ${cfg.server.ip} ${cfg.server.domain}";
|
||||
};
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user