* [gentoo-commits] repo/gentoo:master commit in: net-misc/tor/files/
@ 2016-09-24 12:53 Anthony G. Basile
0 siblings, 0 replies; 2+ messages in thread
From: Anthony G. Basile @ 2016-09-24 12:53 UTC (permalink / raw
To: gentoo-commits
commit: 7d343605cbb1fbcd3614f19db62fbd05bcfe21f6
Author: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
AuthorDate: Sat Sep 24 12:53:12 2016 +0000
Commit: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
CommitDate: Sat Sep 24 12:53:28 2016 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7d343605
net-misc/tor: further economize on openrc init script
Thanks floppym
Package-Manager: portage-2.2.28
net-misc/tor/files/tor.initd-r8 | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/net-misc/tor/files/tor.initd-r8 b/net-misc/tor/files/tor.initd-r8
index e1f6c59..ca31913 100644
--- a/net-misc/tor/files/tor.initd-r8
+++ b/net-misc/tor/files/tor.initd-r8
@@ -7,6 +7,8 @@ command=/usr/bin/tor
pidfile=/var/run/tor/tor.pid
command_args="--hush --runasdaemon 1 --pidfile \"${pidfile}\""
retry=${GRACEFUL_TIMEOUT:-60}
+stopsig=INT
+command_progress=yes
extra_commands="checkconfig"
extra_started_commands="reload"
@@ -28,12 +30,6 @@ start_pre() {
checkpath -d -m 0755 -o tor:tor /var/run/tor
}
-stop() {
- ebegin "Stopping Tor (waiting up to ${retry} seconds)"
- start-stop-daemon -K -s INT -R ${retry} -P -p ${pidfile}
- eend $?
-}
-
reload() {
checkconfig || return 1
ebegin "Reloading Tor configuration"
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: net-misc/tor/files/
@ 2017-01-07 22:28 Anthony G. Basile
0 siblings, 0 replies; 2+ messages in thread
From: Anthony G. Basile @ 2017-01-07 22:28 UTC (permalink / raw
To: gentoo-commits
commit: bf94f03e1509475cedd2eb1ee4337e17a7cc0ed4
Author: Michael Mair-Keimberger (asterix) <m.mairkeimberger <AT> gmail <DOT> com>
AuthorDate: Sat Jan 7 16:44:23 2017 +0000
Commit: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
CommitDate: Sat Jan 7 22:27:48 2017 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bf94f03e
net-misc/tor: remove unused initd file
net-misc/tor/files/tor.initd-r7 | 84 -----------------------------------------
1 file changed, 84 deletions(-)
diff --git a/net-misc/tor/files/tor.initd-r7 b/net-misc/tor/files/tor.initd-r7
deleted file mode 100644
index 3d679c1..00000000
--- a/net-misc/tor/files/tor.initd-r7
+++ /dev/null
@@ -1,84 +0,0 @@
-#!/sbin/openrc-run
-# Copyright 1999-2014 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-PIDFILE=/var/run/tor/tor.pid
-CONFFILE=/etc/tor/torrc
-GRACEFUL_TIMEOUT=${GRACEFUL_TIMEOUT:-60}
-
-# See bug #523552, and https://trac.torproject.org/projects/tor/ticket/5525
-# Graceful = wait 30 secs or so until all connections are properly closed.
-extra_commands="checkconfig"
-extra_started_commands="graceful gracefulstop reload"
-description="Anonymizing overlay network for TCP"
-description_checkconfig="Check for valid config file."
-description_reload="Reload the configuration."
-description_graceful="Gracefully restart."
-description_gracefulstop="Gracefully stop."
-
-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 2>&1
- 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
- checkpath -d -m 0755 -o tor:tor /var/run/tor
- ebegin "Starting Tor"
- HOME=/var/lib/tor
- start-stop-daemon --start --pidfile "${PIDFILE}" --quiet --exec /usr/bin/tor -- -f "${CONFFILE}" --runasdaemon 1 --PidFile "${PIDFILE}" > /dev/null 2>&1
- eend $?
-}
-
-stop() {
- ebegin "Stopping Tor"
- start-stop-daemon --stop --pidfile "${PIDFILE}" --exec /usr/bin/tor -- --PidFile "${PIDFILE}"
- eend $?
-}
-
-graceful() {
- gracefulstop
- start
- eend $?
-}
-
-gracefulstop() {
- local rc=0
- ebegin "Gracefully stopping Tor"
- ebegin "This can take up to ${GRACEFUL_TIMEOUT} seconds"
- start-stop-daemon -P --stop --signal INT -R ${GRACEFUL_TIMEOUT} --pidfile "${PIDFILE}" --exec /usr/bin/tor -- --PidFile "${PIDFILE}"
- rc=$?
- eend "done"
- eend $rc
-}
-
-reload() {
- if [ ! -f ${PIDFILE} ]; then
- eerror "${SVCNAME} isn't running"
- return 1
- fi
- checkconfig || return 1
- ebegin "Reloading Tor configuration"
- start-stop-daemon --signal HUP --pidfile ${PIDFILE}
- eend $?
-}
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-01-07 22:29 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-01-07 22:28 [gentoo-commits] repo/gentoo:master commit in: net-misc/tor/files/ Anthony G. Basile
-- strict thread matches above, loose matches on Subject: below --
2016-09-24 12:53 Anthony G. Basile
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox