initial import

This commit is contained in:
2025-06-22 20:39:04 -05:00
commit f8a70886f0
3428 changed files with 302546 additions and 0 deletions

36
tor/tor.initd Normal file
View File

@@ -0,0 +1,36 @@
#!/sbin/openrc-run
# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
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"
description="Anonymizing overlay network for TCP"
description_checkconfig="Check for valid config file"
description_reload="Reload the configuration"
checkconfig() {
${command} --verify-config --hush > /dev/null 2>&1
if [ $? -ne 0 ] ; then
eerror "Tor configuration (/etc/tor/torrc) is not valid."
return 1
fi
}
start_pre() {
checkconfig || return 1
checkpath -d -m 0755 -o tor:tor /var/run/tor
}
reload() {
checkconfig || return 1
ebegin "Reloading Tor configuration"
start-stop-daemon -s HUP --pidfile ${pidfile}
eend $?
}