Revert "openvpn service: source up/down scripts"

This reverts commit 50ad243f7802c09788441fb0099626387fddb2db.

Changed files
+3 -13
nixos
modules
services
networking
+3 -13
nixos/modules/services/networking/openvpn.nix
···
fi
done
${optionalString cfg.updateResolvConf
"${pkgs.update-resolv-conf}/libexec/openvpn/update-resolv-conf"}
-
-
${optionalString (cfg.up != "") "source ${userSuppliedUpScript}"}
'';
downScript = ''
···
export PATH=${path}
${optionalString cfg.updateResolvConf
"${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}
'';
···
default = "";
type = types.lines;
description = ''
-
Shell script sourced by NixOS generated script when the instance is starting.
'';
};
···
default = "";
type = types.lines;
description = ''
-
Shell script sourced by NixOS generated script when the instance is shutting down.
'';
};
···
fi
done
+
${cfg.up}
${optionalString cfg.updateResolvConf
"${pkgs.update-resolv-conf}/libexec/openvpn/update-resolv-conf"}
'';
downScript = ''
···
export PATH=${path}
${optionalString cfg.updateResolvConf
"${pkgs.update-resolv-conf}/libexec/openvpn/update-resolv-conf"}
${cfg.down}
'';
···
default = "";
type = types.lines;
description = ''
+
Shell commands executed when the instance is starting.
'';
};
···
default = "";
type = types.lines;
description = ''
+
Shell commands executed when the instance is shutting down.
'';
};