| 1 | #!/sbin/openrc-run |
| 2 | |
| 3 | name="otf server" |
| 4 | |
| 5 | : ${command_user:="otf:otf"} |
| 6 | |
| 7 | command="/usr/bin/otfd" |
| 8 | command_args="--secret '$(cat $secret_file)' $command_args" |
| 9 | command_background="yes" |
| 10 | error_log="/var/log/otfd.log" |
| 11 | pidfile="/run/$RC_SVCNAME.pid" |
| 12 | |
| 13 | depend() { |
| 14 | need net |
| 15 | after firewall |
| 16 | } |
| 17 | |
| 18 | start_pre() { |
| 19 | checkpath -f --owner "$command_user" --mode 0644 \ |
| 20 | $error_log |
| 21 | } |