| 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 | |
| 7 | command=/usr/bin/tinyproxy |
| 8 | command_args="-d -c ${CONFFILE}" |
| 9 | command_user="tinyproxy:tinyproxy" |
| 10 | command_background="true" |
| 11 | |
| 12 | pidfile=/run/${SVCNAME}.pid |
| 13 | output_log=/var/log/tinyproxy/${SVCNAME}.log |
| 14 | |
| 15 | depend() { |
| 16 | config "$CONFFILE" |
| 17 | use dns |
| 18 | need net |
| 19 | after firewall |
| 20 | } |
| 21 | |
| 22 | extra_started_commands="reload" |
| 23 | reload() { |
| 24 | ebegin "Reloading ${SVCNAME}" |
| 25 | |
| 26 | start-stop-daemon --signal SIGUSR1 \ |
| 27 | --exec "${command}" --pidfile "${pidfile}" |
| 28 | } |