ntfy-sh: client added delay for network availability

This commit is contained in:
Tigor Hutasuhut 2024-10-30 11:42:09 +07:00
parent 99097713c6
commit a7acfa6ff0

View file

@ -74,7 +74,14 @@ lib.mkMerge [
]; ];
description = "ntfy-sh client"; description = "ntfy-sh client";
serviceConfig = { serviceConfig = {
ExecStart = "${pkgs.ntfy-sh}/bin/ntfy --debug subscribe --config /etc/ntfy/client.yml --from-config"; ExecStart = lib.meta.getExe (
pkgs.writeShellScriptBin "entrypoint.sh" ''
until ${pkgs.unixtools.ping}/bin/ping -c 1 ${domain}; do
${pkgs.coreutils}/bin/sleep 1;
done
${pkgs.ntfy-sh}/bin/ntfy --debug subscribe --config /etc/ntfy/client.yml --from-config
''
);
Restart = "on-failure"; Restart = "on-failure";
# User = config.profile.user.uid; # User = config.profile.user.uid;
# Group = config.profile.user.gid; # Group = config.profile.user.gid;