From 296d59e1efd4df8661ae863972c2e955c2de98e0 Mon Sep 17 00:00:00 2001 From: n-connect Date: Mon, 3 Apr 2023 14:11:57 +0200 Subject: [PATCH 1/3] rc.d startup script for [Free]BSD As a separate file, it can be included in a tar.gz/zip etc. release package during CI/CD process/jobs with the other files. Signed-off-by: n-connect --- service_scripts/nextcloud_notify_push | 36 +++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 service_scripts/nextcloud_notify_push diff --git a/service_scripts/nextcloud_notify_push b/service_scripts/nextcloud_notify_push new file mode 100644 index 00000000..63650323 --- /dev/null +++ b/service_scripts/nextcloud_notify_push @@ -0,0 +1,36 @@ +#! /bin/sh +# +# $FreeBSD$ +# + +# PROVIDE: nextcloud_notify_push +# REQUIRE: NETWORKING DAEMON +# KEYWORD: shutdown + +# +# Add the following lines to /etc/rc.conf to enable nextcloud_notify_push: +# +#nextcloud_notify_push_enable="YES" +#nextcloud_notify_push_droot="YOUR NEXTCLOUD DIRECTORY ROOT" + +. /etc/rc.subr + +name="nextcloud_notify_push" +rcvar="nextcloud_notify_push_enable" + +load_rc_config $name + +: ${nextcloud_notify_push_enable:=NO} +: ${nextcloud_notify_push_droot:=/usr/local/www/html} +: ${nextcloud_notify_push_config:=${nextcloud_notify_push_droot}/config/config.php} +: ${nextcloud_notify_push_flags:=-p 7867} + +my_flags=${nextcloud_notify_push_flags} +nextcloud_notify_push_flags= + +pidfile=/var/run/nextcloud_notify_push.pid +binary="/NEXTCLOUD_ROOT/apps/notify_push/bin/fbsd_amd64/notify_push" +command="/usr/sbin/daemon" +command_args="-S -u www -P ${pidfile} -- ${binary} ${my_flags} ${nextcloud_notify_push_config}" + +run_rc_command "$1" From a5070800f8fdebc2f3f0f1d119a7c6e58a9a76eb Mon Sep 17 00:00:00 2001 From: n-connect Date: Tue, 6 Jun 2023 15:25:58 +0200 Subject: [PATCH 2/3] Update nextcloud_notify_push Signed-off-by: n-connect --- service_scripts/nextcloud_notify_push | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/service_scripts/nextcloud_notify_push b/service_scripts/nextcloud_notify_push index 63650323..67d2f92a 100644 --- a/service_scripts/nextcloud_notify_push +++ b/service_scripts/nextcloud_notify_push @@ -29,7 +29,7 @@ my_flags=${nextcloud_notify_push_flags} nextcloud_notify_push_flags= pidfile=/var/run/nextcloud_notify_push.pid -binary="/NEXTCLOUD_ROOT/apps/notify_push/bin/fbsd_amd64/notify_push" +binary="/${nextcloud_notify_push_droot}/apps/notify_push/bin/fbsd_amd64/notify_push" command="/usr/sbin/daemon" command_args="-S -u www -P ${pidfile} -- ${binary} ${my_flags} ${nextcloud_notify_push_config}" From 084c3420f19087f88d517982aaf709fd31d71d4b Mon Sep 17 00:00:00 2001 From: n-connect Date: Thu, 8 Jun 2023 07:01:14 +0200 Subject: [PATCH 3/3] Update nextcloud_notify_push Typo: leading slash removed for binary Signed-off-by: n-connect --- service_scripts/nextcloud_notify_push | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/service_scripts/nextcloud_notify_push b/service_scripts/nextcloud_notify_push index 67d2f92a..0b8bff62 100644 --- a/service_scripts/nextcloud_notify_push +++ b/service_scripts/nextcloud_notify_push @@ -29,7 +29,7 @@ my_flags=${nextcloud_notify_push_flags} nextcloud_notify_push_flags= pidfile=/var/run/nextcloud_notify_push.pid -binary="/${nextcloud_notify_push_droot}/apps/notify_push/bin/fbsd_amd64/notify_push" +binary="${nextcloud_notify_push_droot}/apps/notify_push/bin/fbsd_amd64/notify_push" command="/usr/sbin/daemon" command_args="-S -u www -P ${pidfile} -- ${binary} ${my_flags} ${nextcloud_notify_push_config}"