aboutsummaryrefslogtreecommitdiffstats
path: root/main/lsyncd/lsyncd.initd
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2011-04-11 10:12:42 +0300
committerTimo Teräs <timo.teras@iki.fi>2011-04-11 10:12:42 +0300
commitaa6f7efd4f5b46dd477ddabc120ec76ed3ebc631 (patch)
treef0d8c0f79ca4abea22749d1a30f8a5263c36fa39 /main/lsyncd/lsyncd.initd
parent672de25ac676f5da1b471b3cfdcc23bf855a4cfa (diff)
downloadaports-aa6f7efd4f5b46dd477ddabc120ec76ed3ebc631.tar.bz2
aports-aa6f7efd4f5b46dd477ddabc120ec76ed3ebc631.tar.xz
main/lsyncd: moved from testing
Diffstat (limited to 'main/lsyncd/lsyncd.initd')
-rw-r--r--main/lsyncd/lsyncd.initd32
1 files changed, 32 insertions, 0 deletions
diff --git a/main/lsyncd/lsyncd.initd b/main/lsyncd/lsyncd.initd
new file mode 100644
index 0000000000..5578b1a2af
--- /dev/null
+++ b/main/lsyncd/lsyncd.initd
@@ -0,0 +1,32 @@
+#!/sbin/runscript
+
+NAME=lsyncd
+DAEMON=/usr/bin/$NAME
+PIDFILE=/var/run/$NAME.pid
+USER=root
+GROUP=root
+CONF=/etc/lsyncd/lsyncd.lua
+
+depend() {
+ need net
+}
+
+start() {
+ touch "$PIDFILE"
+ chown $USER:$GROUP "$PIDFILE"
+ ebegin "Starting $NAME"
+ start-stop-daemon --start --quiet \
+ --pidfile "$PIDFILE" \
+ --user "$USER" --group "$GROUP" \
+ --chdir /etc/lsyncd \
+ --exec "$DAEMON" -- \
+ "$CONF" -pidfile "$PIDFILE"
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping $NAME"
+ start-stop-daemon --stop --quiet \
+ --pidfile "$PIDFILE"
+ eend $?
+}