| 1 | #!/sbin/openrc-run |
| 2 | name="angie" |
| 3 | description="Angie web server" |
| 4 | command="/usr/sbin/angie" |
| 5 | command_args="-c /etc/angie/angie.conf" |
| 6 | pidfile="/run/angie.pid" |
| 7 | start_stop_daemon_args="--quiet --oknodo" |
| 8 | extra_commands="checkconfig reload" |
| 9 | |
| 10 | depend() { |
| 11 | need net |
| 12 | after firewall |
| 13 | } |
| 14 | |
| 15 | checkconfig() { |
| 16 | ebegin "Checking angie configuration" |
| 17 | $command -t -c /etc/angie/angie.conf |
| 18 | eend $? |
| 19 | } |
| 20 | |
| 21 | reload() { |
| 22 | checkconfig || return 1 |
| 23 | ebegin "Reloading angie configuration" |
| 24 | start-stop-daemon --signal HUP --pidfile $pidfile |
| 25 | eend $? |
| 26 | } |