modules/hyprspace: better reload handling
This commit is contained in:
parent
a9abf38ab1
commit
c626e30976
1 changed files with 3 additions and 5 deletions
|
@ -54,7 +54,8 @@ in {
|
|||
Restart = "on-failure";
|
||||
RestartSec = "5s";
|
||||
ExecStart = "${hyprspace}/bin/hyprspace up hyprspace -f -c ${runConfig}";
|
||||
ExecStop = "${hyprspace}/bin/hyprspace down hyprspace";
|
||||
ExecStop = "${hyprspace}/bin/hyprspace down hyprspace -c ${runConfig}";
|
||||
ExecReload = "${pkgs.coreutils}/bin/kill -USR1 $MAINPID";
|
||||
};
|
||||
};
|
||||
networking.firewall = {
|
||||
|
@ -68,10 +69,7 @@ in {
|
|||
PATH=${pkgs.systemd}/bin:$PATH
|
||||
case $1 in
|
||||
wl*|en*)
|
||||
if systemctl is-active hyprspace.service; then
|
||||
${builtins.concatStringsSep "\n" (map (peer: "/run/wrappers/bin/ping -qnA -c3 -W1 ${peer} && exit") (builtins.attrNames peers))}
|
||||
fi
|
||||
systemctl restart --no-block hyprspace.service;;
|
||||
systemctl reload-or-restart --no-block hyprspace.service;;
|
||||
esac
|
||||
exit 0
|
||||
'';
|
||||
|
|
Loading…
Reference in a new issue