diff options
| author | Jan Tuomi <jan@jantuomi.fi> | 2025-10-06 09:55:22 +0300 |
|---|---|---|
| committer | Jan Tuomi <jan@jantuomi.fi> | 2025-10-06 10:42:16 +0300 |
| commit | 5adcc04e4c3441de8258b29216411bb53a709c0f (patch) | |
| tree | 5ccc8ad26eb5f632f79ccdc6f8d0190190ccde07 /templates/usr_local_etc_rc.d_hetzner_ddns.j2 | |
| parent | ae9be6373428471dd4c95f64741b990638c272c0 (diff) | |
Work on Hetzner DDNS
Diffstat (limited to 'templates/usr_local_etc_rc.d_hetzner_ddns.j2')
| -rw-r--r-- | templates/usr_local_etc_rc.d_hetzner_ddns.j2 | 48 |
1 files changed, 0 insertions, 48 deletions
diff --git a/templates/usr_local_etc_rc.d_hetzner_ddns.j2 b/templates/usr_local_etc_rc.d_hetzner_ddns.j2 deleted file mode 100644 index ccbbb8c..0000000 --- a/templates/usr_local_etc_rc.d_hetzner_ddns.j2 +++ /dev/null @@ -1,48 +0,0 @@ -#!/bin/sh -# -# PROVIDE: hetzner_ddns -# REQUIRE: NETWORKING -# KEYWORD: shutdown - -# Enable via: -# hetzner_ddns_enable="YES" -# -# (pfSense: System -> Advanced -> System Tunables or /etc/rc.conf) - -. /etc/rc.subr - -name="hetzner_ddns" -rcvar=hetzner_ddns_enable - -load_rc_config $name - -: ${hetzner_ddns_enable:="NO"} -: ${hetzner_ddns_user:="root"} -: ${hetzner_ddns_command:="/usr/local/bin/hetzner-ddns.sh"} - -start_cmd="${name}_start" -stop_cmd="${name}_stop" -status_cmd="${name}_status" - -hetzner_ddns_start() { - echo "Starting ${name}..." - /usr/sbin/daemon -t "${name}" -u "${hetzner_ddns_user}" ${hetzner_ddns_command} -} - -hetzner_ddns_stop() { - echo "Stopping ${name}..." - # First try by daemon title, then by command as fallback - pkill -f "^daemon: ${name}$" || pkill -f "${hetzner_ddns_command}" -} - -hetzner_ddns_status() { - if pgrep -f "^daemon: ${name}$" >/dev/null 2>&1 || pgrep -f "${hetzner_ddns_command}" >/dev/null 2>&1; then - echo "${name} is running" - return 0 - else - echo "${name} is not running" - return 1 - fi -} - -run_rc_command "$1" |
