1
0
Fork 0
mirror of https://gitlab.alpinelinux.org/alpine/aports.git synced 2025-07-13 03:09:51 +03:00
aports/main/tinyproxy/tinyproxy.initd
2022-08-29 07:10:03 +02:00

28 lines
609 B
Bash

#!/sbin/openrc-run
# Copyright 1999-2018 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
: ${CONFFILE:="/etc/${SVCNAME}/${SVCNAME}.conf"}
command=/usr/bin/tinyproxy
command_args="-d -c ${CONFFILE}"
command_user="tinyproxy:tinyproxy"
command_background="true"
pidfile=/run/${SVCNAME}.pid
output_log=/var/log/tinyproxy/${SVCNAME}.log
depend() {
config "$CONFFILE"
use dns
need net
after firewall
}
extra_started_commands="reload"
reload() {
ebegin "Reloading ${SVCNAME}"
start-stop-daemon --signal SIGUSR1 \
--exec "${command}" --pidfile "${pidfile}"
}