projects/aports·blob master · refs

28 lines · 609 B

1#!/sbin/openrc-run
2# Copyright 1999-2018 Gentoo Authors
3# Distributed under the terms of the GNU General Public License v2
4
5: ${CONFFILE:="/etc/${SVCNAME}/${SVCNAME}.conf"}
6
7command=/usr/bin/tinyproxy
8command_args="-d -c ${CONFFILE}"
9command_user="tinyproxy:tinyproxy"
10command_background="true"
11
12pidfile=/run/${SVCNAME}.pid
13output_log=/var/log/tinyproxy/${SVCNAME}.log
14
15depend() {
16 config "$CONFFILE"
17 use dns
18 need net
19 after firewall
20}
21
22extra_started_commands="reload"
23reload() {
24 ebegin "Reloading ${SVCNAME}"
25
26 start-stop-daemon --signal SIGUSR1 \
27 --exec "${command}" --pidfile "${pidfile}"
28}