aboutsummaryrefslogtreecommitdiffstats
path: root/testing/syncthing-inotify/syncthing-inotify.initd
diff options
context:
space:
mode:
authorCarlo Landmeter <clandmeter@gmail.com>2017-08-09 23:30:24 +0200
committerCarlo Landmeter <clandmeter@gmail.com>2017-08-09 23:30:24 +0200
commit49a8caa541860beb46de8bd16cb14f853d67ab12 (patch)
tree4f49c052c8c3449aad5f550c4aad909b7b539972 /testing/syncthing-inotify/syncthing-inotify.initd
parentd349d7186c6c2f2b912ecb054e6657b2eb373e13 (diff)
downloadaports-49a8caa541860beb46de8bd16cb14f853d67ab12.tar.bz2
aports-49a8caa541860beb46de8bd16cb14f853d67ab12.tar.xz
testing/syncthing-inotify: new aport
Diffstat (limited to 'testing/syncthing-inotify/syncthing-inotify.initd')
-rw-r--r--testing/syncthing-inotify/syncthing-inotify.initd21
1 files changed, 21 insertions, 0 deletions
diff --git a/testing/syncthing-inotify/syncthing-inotify.initd b/testing/syncthing-inotify/syncthing-inotify.initd
new file mode 100644
index 0000000000..64589eafef
--- /dev/null
+++ b/testing/syncthing-inotify/syncthing-inotify.initd
@@ -0,0 +1,21 @@
+#!/sbin/openrc-run
+
+name=$RC_SVCNAME
+command=/usr/bin/syncthing-inotify
+command_args="${SYNCTHING_INOTIFY_ARGS}"
+command_user="${SYNCTHING_INOTIFY_USER:-syncthing}"
+pidfile=/run/${RC_SVCNAME}.pid
+command_background=yes
+start_stop_daemon_args="--stdout /var/log/$RC_SVCNAME/${RC_SVCNAME}.log --stderr /var/log/$RC_SVCNAME/${RC_SVCNAME}.log"
+
+depend() {
+ use logger dns
+ need net
+ after firewall
+}
+
+start_pre() {
+ checkpath --directory --owner $command_user --mode 0775 \
+ /var/log/$RC_SVCNAME
+}
+