diff options
-rw-r--r-- | testing/calibre/calibre.confd | 6 | ||||
-rw-r--r-- | testing/calibre/calibre.initd | 16 |
2 files changed, 22 insertions, 0 deletions
diff --git a/testing/calibre/calibre.confd b/testing/calibre/calibre.confd new file mode 100644 index 000000000..c20e67699 --- /dev/null +++ b/testing/calibre/calibre.confd @@ -0,0 +1,6 @@ +DAEMON=/usr/bin/$NAME +PIDFILE=/var/run/$NAME.pid +CONTENT=/var/lib/calibre +PORT=8080 +MAX_COVER=600x800 +DAEMON_ARGS="--auto-reload --with-library=$CONTENT --pidfile=$PIDFILE --port=$PORT --max-cover=$MAX_COVER --daemonize" diff --git a/testing/calibre/calibre.initd b/testing/calibre/calibre.initd new file mode 100644 index 000000000..92986a9a7 --- /dev/null +++ b/testing/calibre/calibre.initd @@ -0,0 +1,16 @@ +#!/sbin/runscript + +depend() { + need net + after firewall +} +start() { + ebegin "Starting Calibre Server" + start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON -- $DAEMON_ARGS + eend $? +} + +stop() { + start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --pidfile $PIDFILE + rm -f $PIDFILE +} |