working
This commit is contained in:
27
app/templates/init.d/api
Executable file
27
app/templates/init.d/api
Executable file
@@ -0,0 +1,27 @@
|
||||
#!/sbin/openrc-run
|
||||
|
||||
name="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/4server ]; then
|
||||
. /etc/4server
|
||||
export $(cut -d= -f1 /etc/4server)
|
||||
fi
|
||||
|
||||
# Logs
|
||||
output_log="/4server/data/log/api.log"
|
||||
error_log="/4server/data/log/api.log"
|
||||
|
||||
depend() {
|
||||
need net
|
||||
use logger dns
|
||||
after firewall
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user