diff options
author | Gluzskiy Alexandr <sss@sss.chaoslab.ru> | 2017-11-06 00:23:07 +0300 |
---|---|---|
committer | Gluzskiy Alexandr <sss@sss.chaoslab.ru> | 2017-11-06 00:23:07 +0300 |
commit | a4945df3f139cfbfe9ab229233baa96f07564cce (patch) | |
tree | fe0e4cd03151feb710afd7b3860933e7158baab0 /net-vpn | |
parent | 15ee734594baac1e83c8bcb8d0c8888ad4dfd2c3 (diff) |
новый файл: dev-libs/libebml/libebml-scm.ebuild
новый файл: dev-libs/libebml/metadata.xml
новый файл: games-emulation/ppsspp/files/ppsspp-1.4-O2.patch
новый файл: games-emulation/ppsspp/files/ppsspp-1.4-assets-lookup.patch
новый файл: games-emulation/ppsspp/metadata.xml
новый файл: games-emulation/ppsspp/ppsspp-scm.ebuild
новый файл: net-vpn/tor/files/tor.initd-r8
Diffstat (limited to 'net-vpn')
-rw-r--r-- | net-vpn/tor/files/tor.initd-r8 | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/net-vpn/tor/files/tor.initd-r8 b/net-vpn/tor/files/tor.initd-r8 new file mode 100644 index 0000000..de9b66e --- /dev/null +++ b/net-vpn/tor/files/tor.initd-r8 @@ -0,0 +1,37 @@ +#!/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." + eerror "Example is in /etc/tor/torrc.sample" + 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 $? +} |