Files
whois/mwhoisd.initd
Olaf Baumert 34c631a06d Initial commit: mwhois with SCION AS support and decimal AS conversion
Based on mwhois by Antonios A. Chariton
Modifications for SCION AS support by Olaf Baumert, Axpo Systems AG
2025-06-03 11:01:02 +00:00

28 lines
686 B
Plaintext
Executable File

#!/sbin/openrc-run
name="mwhoisd"
description="MWHOIS Daemon"
command="/root/whois/mwhoisd"
command_background="yes"
pidfile="/run/${RC_SVCNAME}.pid"
start_stop_daemon_args="--chdir /root/whois"
command_user="root"
# Redirect output to files
output_log="/root/whois/mwhoisd.out"
error_log="/root/whois/mwhoisd.err"
start_stop_daemon_args="${start_stop_daemon_args} --stdout ${output_log} --stderr ${error_log}"
# Make sure we're running as root to bind to port 43
command_user="root"
depend() {
need net
after firewall
}
start_pre() {
touch "${output_log}" "${error_log}"
chmod 644 "${output_log}" "${error_log}"
chown root:root "${output_log}" "${error_log}"
}