From 30523766e8a63fe847a45a58e7c127838859a468 Mon Sep 17 00:00:00 2001 From: Franco Fichtner Date: Wed, 29 Jun 2022 12:49:03 +0200 Subject: [PATCH] dns/ddclient: reload does not exist, status/stop/restart unreliable The rc.d file needs to be changed in FreeBSD but for now work around this in the easiest way possible. --- .../service/conf/actions.d/actions_ddclient.conf | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/dns/ddclient/src/opnsense/service/conf/actions.d/actions_ddclient.conf b/dns/ddclient/src/opnsense/service/conf/actions.d/actions_ddclient.conf index 99e5b6b38..8e5e6c59c 100644 --- a/dns/ddclient/src/opnsense/service/conf/actions.d/actions_ddclient.conf +++ b/dns/ddclient/src/opnsense/service/conf/actions.d/actions_ddclient.conf @@ -6,30 +6,24 @@ type:script message:starting ddclient [stop] -command:/usr/local/etc/rc.d/ddclient stop +command:pkill -F /var/run/ddclient.pid 2> /dev/null; exit 0 type:script message:stopping ddclient [status] -command:/usr/local/etc/rc.d/ddclient status; exit 0 +command:pgrep -qF /var/run/ddclient.pid && echo "ddclient is running" || echo "ddclient is not running" type:script_output message:get ddclient status [restart] command: chmod 600 /usr/local/etc/ddclient.conf; + pkill -F /var/run/ddclient.pid 2> /dev/null; /usr/local/etc/rc.d/ddclient restart type:script message:restarting ddclient description:Restart ddclient service -[reload] -command: - chmod 600 /usr/local/etc/ddclient.conf; - /usr/local/etc/rc.d/ddclient reload -type:script -message:reload ddclient configuration - [force] command: chmod 600 /usr/local/etc/ddclient.conf;