Files
cc/app/templates/init.d/4server-api
2025-08-16 14:53:15 +02:00

28 lines
478 B
Plaintext
Executable File

#!/sbin/openrc-run
name="4server-api"
description="4server API Service"
# Command uses Python inside the venv
command="/4server/sbin/api"
command_args=""
pidfile="/run/${RC_SVCNAME}.pid"
command_background="yes"
# Load environment variables if needed
if [ -f /etc/od8n ]; then
. /etc/od8n
export $(cut -d= -f1 /etc/od8n)
fi
# Logs
output_log="/4server/data/api.log"
error_log="/4server/data/api.log"
depend() {
need net
use logger dns
after firewall
}