aboutsummaryrefslogtreecommitdiffstats
path: root/templates/usr_local_etc_rc.d_hetzner_ddns.j2
diff options
context:
space:
mode:
Diffstat (limited to 'templates/usr_local_etc_rc.d_hetzner_ddns.j2')
-rw-r--r--templates/usr_local_etc_rc.d_hetzner_ddns.j248
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"