All services moved to deployed filesystem

This commit is contained in:
Adam Outler
2025-09-28 17:10:15 -04:00
parent d182a552b8
commit c6efe5ac06
19 changed files with 695 additions and 145 deletions

View File

@@ -1,7 +1,4 @@
#!/bin/bash
echo "Initializing crond..."
# Add crontab file
rm /etc/crontabs/root
chmod 600 /etc/crontabs/netalertx
chown netalertx:netalertx /etc/crontabs/netalertx
#Future crond initializations can go here.
echo "crond initialized."

View File

@@ -1,3 +1,4 @@
#!/bin/bash
echo "Initializing nginx..."
# Nothing to do here, nginx is configured at runtime
#Future crond initializations can go here.
echo "nginx initialized."

View File

@@ -2,21 +2,6 @@
echo "Initializing php-fpm..."
# Set up PHP-FPM directories and socket configuration
install -d -o netalertx -g netalertx /run/php/
sed -i "/^;pid/c\pid = /run/php/php8.3-fpm.pid" /etc/php83/php-fpm.conf
sed -i "/^listen/c\listen = /run/php/php8.3-fpm.sock" /etc/php83/php-fpm.d/www.conf
sed -i "/^;listen.owner/c\listen.owner = netalertx" /etc/php83/php-fpm.d/www.conf
sed -i "/^;listen.group/c\listen.group = netalertx" /etc/php83/php-fpm.d/www.conf
sed -i "/^user/c\user = netalertx" /etc/php83/php-fpm.d/www.conf
sed -i "/^group/c\group = netalertx" /etc/php83/php-fpm.d/www.conf
# Increase max child process count
sed -i -e 's/pm.max_children = 5/pm.max_children = 10/' /etc/php83/php-fpm.d/www.conf
# Set error log path
sed -i "/^;*error_log\s*=/c\error_log = ${LOG_APP_PHP_ERRORS}" /etc/php83/php-fpm.conf
# If the line was not found, append it to the end of the file
if ! grep -q '^error_log\s*=' /etc/php83/php-fpm.conf; then
echo "error_log = ${LOG_APP_PHP_ERRORS}" >> /etc/php83/php-fpm.conf
fi
echo "php-fpm initialized."