fix ovpn
This commit is contained in:
parent
8c6eae85ac
commit
56cc36194d
@ -34,7 +34,7 @@ let
|
||||
"${file}" = {
|
||||
format = "binary";
|
||||
sopsFile = ./openvpn/${file};
|
||||
path = "${delugevpn_path}/config/openvpn/${file}";
|
||||
path = "${delugevpn_path}/config/openvpn/configs/${file}";
|
||||
owner = "docker-service";
|
||||
group = "users";
|
||||
restartUnits = [ "docker-delugeVPN.service" ];
|
||||
@ -89,21 +89,21 @@ in
|
||||
};
|
||||
};
|
||||
|
||||
# systemd.services.docker-delugeVPN = {
|
||||
# serviceConfig = {
|
||||
# ExecStartPre = [
|
||||
# (
|
||||
# "${pkgs.bash}/bin/bash -c \"${pkgs.findutils}/bin/find ${delugevpn_path}/config/wireguard/configs "
|
||||
# + "-type l -not -name wg0.conf "
|
||||
# + "| ${pkgs.coreutils}/bin/shuf -n 1 "
|
||||
# + "| ${pkgs.findutils}/bin/xargs -I {} cp -L {} ${delugevpn_path}/config/wireguard/wg0.conf &&"
|
||||
# + "${pkgs.coreutils}/bin/chown docker-service:users ${delugevpn_path}/config/wireguard/wg0.conf &&"
|
||||
# + "${pkgs.coreutils}/bin/chmod 440 ${delugevpn_path}/config/wireguard/wg0.conf\""
|
||||
# )
|
||||
# ];
|
||||
# ExecStopPost = [ "${pkgs.coreutils}/bin/rm ${delugevpn_path}/config/wireguard/wg0.conf" ];
|
||||
# };
|
||||
# };
|
||||
systemd.services.docker-delugeVPN = {
|
||||
serviceConfig = {
|
||||
ExecStartPre = [
|
||||
(
|
||||
"${pkgs.bash}/bin/bash -c \"${pkgs.findutils}/bin/find ${delugevpn_path}/config/openvpn/configs "
|
||||
+ "-type l -not -name network.ovpn "
|
||||
+ "| ${pkgs.coreutils}/bin/shuf -n 1 "
|
||||
+ "| ${pkgs.findutils}/bin/xargs -I {} cp -L {} ${delugevpn_path}/config/openvpn/network.ovpn &&"
|
||||
+ "${pkgs.coreutils}/bin/chown docker-service:users ${delugevpn_path}/config/openvpn/network.ovpn &&"
|
||||
+ "${pkgs.coreutils}/bin/chmod 440 ${delugevpn_path}/config/openvpn/network.ovpn\""
|
||||
)
|
||||
];
|
||||
ExecStopPost = [ "${pkgs.coreutils}/bin/rm ${delugevpn_path}/config/openvpn/network.ovpn" ];
|
||||
};
|
||||
};
|
||||
|
||||
sops.secrets = (genSopsConfOvpn "se.protonvpn.udp.ovpn") // {
|
||||
"docker/delugevpn".owner = "docker-service";
|
||||
|
Loading…
x
Reference in New Issue
Block a user