Multiple changes

This commit is contained in:
2025-02-12 21:01:52 +01:00
parent d66df792c6
commit 63165795ca
5 changed files with 33 additions and 6 deletions

24
app/scripts/healthchecker.sh Executable file
View File

@@ -0,0 +1,24 @@
#!/bin/sh
# Check if nginx is running
/etc/init.d/nginx status >/dev/null 2>&1
if [ $? -ne 0 ]; then
NGINX="nginx failed!"
fi
# Check if MariaDB is running
/etc/init.d/mariadb status >/dev/null 2>&1
if [ $? -ne 0 ]; then
MARIADB="mariadb failed!"
fi
# Check if PHP-FPM is running
/etc/init.d/php8.2-fpm status >/dev/null 2>&1
if [ $? -ne 0 ]; then
PHP82="php8.2-fpm failed!"
fi
if [ -n "$NGINX$MARIADB$PHP82" ]; then
echo "$NGINX $MARIADB $PHP82" && exit 1
fi

View File

@@ -0,0 +1,4 @@
#!/bin/sh
apt-get install php8.2 php8.2-common php8.2-fpm -y # PHP
apt-get install vim file bash-completion procps nginx screen git sudo less -y # Utils
apt-get install mariadb-client mariadb-server -y # MariaDB Server + Client

5
app/scripts/launch-daemons.sh Executable file
View File

@@ -0,0 +1,5 @@
#!/bin/sh
/etc/init.d/nginx start
/etc/init.d/php8.2-fpm start
/etc/init.d/mariadb start
/bin/sh

13
app/scripts/sury-php-repo.sh Executable file
View File

@@ -0,0 +1,13 @@
#!/bin/sh
# To add this repository please do:
if [ "$(whoami)" != "root" ]; then
SUDO=sudo
fi
${SUDO} apt-get update
${SUDO} apt-get -y install lsb-release ca-certificates curl
${SUDO} curl -sSLo /tmp/debsuryorg-archive-keyring.deb https://packages.sury.org/debsuryorg-archive-keyring.deb
${SUDO} dpkg -i /tmp/debsuryorg-archive-keyring.deb
${SUDO} sh -c 'echo "deb [signed-by=/usr/share/keyrings/deb.sury.org-php.gpg] https://packages.sury.org/php/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/php.list'
${SUDO} apt-get update