diff options
author | Christian Faulhammer <opfer@gentoo.org> | 2008-02-07 13:42:23 +0000 |
---|---|---|
committer | Christian Faulhammer <opfer@gentoo.org> | 2008-02-07 13:42:23 +0000 |
commit | 922a8d17f25c096859b7092cb9777300bcd37764 (patch) | |
tree | f4efc6c5d6ad64c23882d41c10cccf3a404f2e23 /net-misc/tor/files | |
parent | Version bump (diff) | |
download | gentoo-2-922a8d17f25c096859b7092cb9777300bcd37764.tar.gz gentoo-2-922a8d17f25c096859b7092cb9777300bcd37764.tar.bz2 gentoo-2-922a8d17f25c096859b7092cb9777300bcd37764.zip |
clean up
(Portage version: 2.1.3.19)
Diffstat (limited to 'net-misc/tor/files')
-rw-r--r-- | net-misc/tor/files/tor.initd-r2 | 57 |
1 files changed, 0 insertions, 57 deletions
diff --git a/net-misc/tor/files/tor.initd-r2 b/net-misc/tor/files/tor.initd-r2 deleted file mode 100644 index df4f8ad652a0..000000000000 --- a/net-misc/tor/files/tor.initd-r2 +++ /dev/null @@ -1,57 +0,0 @@ -#!/sbin/runscript -# Copyright 1999-2005 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-misc/tor/files/tor.initd-r2,v 1.1 2007/05/15 15:57:21 humpback Exp $ - -opts="${opts} checkconfig reload" -PIDFILE=/var/run/tor/tor.pid -CONFFILE=/etc/tor/torrc - -depend() { - need net -} - -checkconfig() { - # first check that it exists - if [ ! -f ${CONFFILE} ] ; then - eerror "You need to setup ${CONFFILE} first" - eerror "Example is in ${CONFFILE}.sample" - return 1 - fi - - # now verify whether the configuration is valid - /usr/bin/tor --verify-config -f ${CONFFILE} &> /dev/null - if [ $? -eq 0 ] ; then - einfo "Tor configuration (${CONFFILE}) is valid." - return 0 - else - eerror "Tor configuration (${CONFFILE}) not valid." - /usr/bin/tor --verify-config -f ${CONFFILE} - return 1 - fi -} - -start() { - checkconfig || return 1 - ebegin "Starting Tor" - HOME=/var/lib/tor - start-stop-daemon --start --quiet --chuid tor --exec /usr/bin/tor -- --runasdaemon 1 &> /dev/null - eend $? -} - -stop() { - ebegin "Stopping Tor" - start-stop-daemon --stop --quiet --chuid tor --exec /usr/bin/tor - eend $? -} - -reload() { - if [ ! -f ${PIDFILE} ]; then - eerror "${SVCNAME} isn't running" - return 1 - fi - checkconfig || return 1 - ebegin "Reloading Tor configuration" - start-stop-daemon --stop --oknodo --signal HUP --pidfile ${PIDFILE} - eend $? -} |