| 1 | #!/sbin/openrc-run |
| 2 | |
| 3 | name="SSHGuard" |
| 4 | description="Protects hosts from brute-force attacks against SSH and other services" |
| 5 | |
| 6 | # Log startup errrors to syslog. |
| 7 | : ${error_logger="logger -t sshguard -p daemon.err >/dev/null 2>&1"} |
| 8 | |
| 9 | command="/usr/sbin/sshguard" |
| 10 | # $SSHGUARD_OPTS is only for backward compatibility (Alpine <3.19) |
| 11 | command_args="$SSHGUARD_OPTS $command_args" |
| 12 | command_background="yes" |
| 13 | pidfile="/run/$RC_SVCNAME.pid" |
| 14 | |
| 15 | depend() { |
| 16 | after firewall |
| 17 | use logger |
| 18 | } |