This commit is contained in:
Oliver
2025-08-30 10:29:36 +02:00
parent 86acea94b9
commit 7d0f1967b3
4 changed files with 13 additions and 11 deletions

View File

@@ -1 +1 @@
API_KEY={API_KEY} API_KEY={{API_KEY}}

View File

@@ -1,6 +1,6 @@
#!/sbin/openrc-run #!/sbin/openrc-run
name="4server-api" name="api"
description="4server API Service" description="4server API Service"
# Command uses Python inside the venv # Command uses Python inside the venv
@@ -10,9 +10,9 @@ pidfile="/run/${RC_SVCNAME}.pid"
command_background="yes" command_background="yes"
# Load environment variables if needed # Load environment variables if needed
if [ -f /etc/od8n ]; then if [ -f /etc/4server ]; then
. /etc/od8n . /etc/4server
export $(cut -d= -f1 /etc/od8n) export $(cut -d= -f1 /etc/4server)
fi fi
# Logs # Logs

View File

@@ -24,14 +24,16 @@ prsync -h "/app/host_vars/hosts" -avz ./sbin/ /4server/sbin/
### API ### API
#INSTALL API KEYS #INSTALL API KEYS
template templates/4server /etc/4server template templates/4server /etc/4server
rex doas chown root:root /etc/4server
rex doas chmod 600 /etc/4server
#INSTALL API SERVICE #INSTALL API SERVICE
template templates/init.d/4server-api /etc/init.d/4server-api template templates/init.d/api /etc/init.d/api
rex doas chmod 0755 /etc/init.d/4server-api rex doas chmod 0755 /etc/init.d/api
rex doas chown root:root /etc/init.d/4server-api rex doas chown root:root /etc/init.d/api
rex doas rc-update add 4server-api default rex doas rc-update add api default
rex doas rc-service 4server-api restart rex doas rc-service api restart
### Infrastructure ### Infrastructure

Binary file not shown.