mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-19 03:14:03 +00:00
Revert "openvpn service: source up/down scripts"
This reverts commit 50ad243f78
.
This commit is contained in:
parent
7deb425286
commit
bdd89faebb
@ -28,10 +28,9 @@ let
|
|||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
|
${cfg.up}
|
||||||
${optionalString cfg.updateResolvConf
|
${optionalString cfg.updateResolvConf
|
||||||
"${pkgs.update-resolv-conf}/libexec/openvpn/update-resolv-conf"}
|
"${pkgs.update-resolv-conf}/libexec/openvpn/update-resolv-conf"}
|
||||||
|
|
||||||
${optionalString (cfg.up != "") "source ${userSuppliedUpScript}"}
|
|
||||||
'';
|
'';
|
||||||
|
|
||||||
downScript = ''
|
downScript = ''
|
||||||
@ -39,15 +38,6 @@ let
|
|||||||
export PATH=${path}
|
export PATH=${path}
|
||||||
${optionalString cfg.updateResolvConf
|
${optionalString cfg.updateResolvConf
|
||||||
"${pkgs.update-resolv-conf}/libexec/openvpn/update-resolv-conf"}
|
"${pkgs.update-resolv-conf}/libexec/openvpn/update-resolv-conf"}
|
||||||
|
|
||||||
${optionalString (cfg.down != "") "source ${userSuppliedDownScript}"}
|
|
||||||
'';
|
|
||||||
|
|
||||||
userSuppliedUpScript = pkgs.writeScript "openvpn-${name}-userSuppliedUpScript" ''
|
|
||||||
${cfg.up}
|
|
||||||
'';
|
|
||||||
|
|
||||||
userSuppliedDownScript = pkgs.writeScript "openvpn-${name}-userSuppliedDownScript" ''
|
|
||||||
${cfg.down}
|
${cfg.down}
|
||||||
'';
|
'';
|
||||||
|
|
||||||
@ -143,7 +133,7 @@ in
|
|||||||
default = "";
|
default = "";
|
||||||
type = types.lines;
|
type = types.lines;
|
||||||
description = ''
|
description = ''
|
||||||
Shell script sourced by NixOS generated script when the instance is starting.
|
Shell commands executed when the instance is starting.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -151,7 +141,7 @@ in
|
|||||||
default = "";
|
default = "";
|
||||||
type = types.lines;
|
type = types.lines;
|
||||||
description = ''
|
description = ''
|
||||||
Shell script sourced by NixOS generated script when the instance is shutting down.
|
Shell commands executed when the instance is shutting down.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user