diff options
Diffstat (limited to 'net-proxy/redsocks/files/redsocks.init')
-rw-r--r-- | net-proxy/redsocks/files/redsocks.init | 53 |
1 files changed, 0 insertions, 53 deletions
diff --git a/net-proxy/redsocks/files/redsocks.init b/net-proxy/redsocks/files/redsocks.init deleted file mode 100644 index 853d9b57a6bb..000000000000 --- a/net-proxy/redsocks/files/redsocks.init +++ /dev/null @@ -1,53 +0,0 @@ -#!/sbin/openrc-run -# Copyright 1999-2017 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -: ${REDSOCKS_BINARY:=/usr/sbin/redsocks} -: ${REDSOCKS_CONFIG:=/etc/redsocks.conf} -: ${REDSOCKS_PIDFILE:=/run/redsocks/redsocks.pid} - -extra_commands="checkconfig" -extra_started_commands="reload" - -depend() { - need localmount - use dns -} - -checkconfig() { - if [ ! -f "${REDSOCKS_CONFIG}" ] ; then - eerror "No ${REDSOCKS_CONFIG} file exists!" - return 1 - fi - - "${REDSOCKS_BINARY}" -t -c ${REDSOCKS_CONFIG} || return 1 -} - -start() { - checkconfig || return 1 - - ebegin "Starting ${SVCNAME}" - start-stop-daemon --start --exec "${REDSOCKS_BINARY}" \ - -p "${REDSOCKS_PIDFILE}" -c ${REDSOCKS_CONFIG} - eend $? -} - -stop() { - if [ "${RC_CMD}" = "restart" ] ; then - checkconfig || return 1 - fi - - ebegin "Stopping ${SVCNAME}" - start-stop-daemon --stop --exec "${REDSOCKS_BINARY}" \ - -p "${REDSOCKS_PIDFILE}" -c "${REDSOCKS_CONFIG}" - eend $? -} - -reload() { - checkconfig || return 1 - - ebegin "Reloading ${SVCNAME}" - start-stop-daemon --signal HUP --exec "${REDSOCKS_BINARY}" \ - -p "${REDSOCKS_PIDFILE}" -c "${REDSOCKS_CONFIG}" - eend $? -} |