diff options
author | Timo Teräs <timo.teras@iki.fi> | 2011-04-11 10:12:42 +0300 |
---|---|---|
committer | Timo Teräs <timo.teras@iki.fi> | 2011-04-11 10:12:42 +0300 |
commit | aa6f7efd4f5b46dd477ddabc120ec76ed3ebc631 (patch) | |
tree | f0d8c0f79ca4abea22749d1a30f8a5263c36fa39 /main/lsyncd/lsyncd.initd | |
parent | 672de25ac676f5da1b471b3cfdcc23bf855a4cfa (diff) | |
download | aports-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.initd | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/main/lsyncd/lsyncd.initd b/main/lsyncd/lsyncd.initd new file mode 100644 index 000000000..5578b1a2a --- /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 $? +} |