From dd9a6048bb109494072d94281701ad9734d2b275 Mon Sep 17 00:00:00 2001 From: My Name Date: Thu, 11 Dec 2014 00:47:01 +0100 Subject: Added ZNC init + monit script, rtorrent + zabbix-server monit config and fixed typos --- initrc/rtorrent | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100755 initrc/rtorrent (limited to 'initrc/rtorrent') diff --git a/initrc/rtorrent b/initrc/rtorrent new file mode 100755 index 0000000..7f36a74 --- /dev/null +++ b/initrc/rtorrent @@ -0,0 +1,36 @@ +#!/bin/bash +set -e + +RTORRENTUSER="horus" +NAME=rtorrent +DESC="rtorrent, a cli bittorrent client." + +DAEMON="/usr/bin/rtorrent" +SCREEN="/usr/bin/screen" + +PIDFILE="/var/run/${NAME}.pid" + +START_OPTS="--start --background --make-pidfile --pidfile ${PIDFILE} --chuid $RTORRENTUSER --exec $SCREEN -- -DmUS ${NAME} ${DAEMON}" +END_OPTS="--stop --pidfile ${PIDFILE}" + +case "$1" in + start) + echo "Starting ${DESC}" + start-stop-daemon $START_OPTS + ;; + stop) + echo "Stopping ${DESC}" + start-stop-daemon $END_OPTS + rm -f "${PIDFILE}" + ;; + restart) + "$0" stop + rm -f "${PIDFILE}" + sleep 1 + "$0" start + ;; + *) + echo "Usage: $0 {start|stop|restart}" + exit 1 + ;; +esac -- cgit v1.2.3