diff options
Diffstat (limited to 'net-p2p/transmission/files/transmission-daemon.initd.4')
-rw-r--r-- | net-p2p/transmission/files/transmission-daemon.initd.4 | 71 |
1 files changed, 0 insertions, 71 deletions
diff --git a/net-p2p/transmission/files/transmission-daemon.initd.4 b/net-p2p/transmission/files/transmission-daemon.initd.4 deleted file mode 100644 index 80a373f3cbd4..000000000000 --- a/net-p2p/transmission/files/transmission-daemon.initd.4 +++ /dev/null @@ -1,71 +0,0 @@ -#!/sbin/runscript -# Copyright 1999-2010 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-p2p/transmission/files/transmission-daemon.initd.4,v 1.1 2010/10/25 13:29:41 pva Exp $ - -opts="start stop reload" -description="Transmission is a fast, easy and free bittorrent client" -description_start="Start transmission-daemon server and web interface" -description_stop="Stop transmission-daemon server and web interface" -description_reload="Reload transmission-daemon settings" - -pidfile=/var/run/transmission/transmission.pid -config_dir=/var/transmission/config -download_dir=/var/transmission/downloads -logfile=${logfile:-/var/log/transmission/transmission.log} -runas_user=${runas_user:-transmission:transmission} - -SSD_OPTIONS="" - -depend() { - need net -} - -check_config() { - if [ ! -d /var/run/transmission/ ]; then - mkdir /var/run/transmission/ - if [ -n "${runas_user}" ]; then - chown -R ${runas_user} /var/run/transmission/ - fi - fi - - # In case no config directory option passed use default - if ! $(echo ${TRANSMISSION_OPTIONS} | grep -q -e ' -g' -e ' --config-dir'); then - TRANSMISSION_OPTIONS="${TRANSMISSION_OPTIONS} --config-dir ${config_dir}" - # put download dir location on first run (and take it from config later) - if [ ! -f ${config_dir}/settings.json ]; then - TRANSMISSION_OPTIONS="${TRANSMISSION_OPTIONS} --download-dir ${download_dir}" - fi - fi - - if [ -n "${runas_user}" ]; then - if [ -f /etc/init.d/sysfs ]; then - SSD_OPTIONS="${SSD_OPTIONS} --user ${runas_user}" - else - SSD_OPTIONS="${SSD_OPTIONS} --chuid ${runas_user}" - fi - fi -} - -start() { - check_config - - ebegin "Starting transmission daemon" - start-stop-daemon --start --quiet --background --pidfile ${pidfile} ${SSD_OPTIONS} \ - --exec /usr/bin/transmission-daemon -- --pid-file ${pidfile} --logfile ${logfile} \ - ${TRANSMISSION_OPTIONS} - eend $? -} - -stop() { - ebegin "Stopping transmission daemon" - start-stop-daemon --stop --quiet --retry TERM/45/QUIT/15 --pidfile ${pidfile} - eend $? -} - -reload() { - ebegin "Reloading transmission configuration" - start-stop-daemon --signal HUP --pidfile ${pidfile} - eend $? -} - |