#6 - Prima stesura worker

This commit is contained in:
2022-09-29 23:13:55 +02:00
parent effeae054e
commit 8a097b5956
21 changed files with 203 additions and 95 deletions
+13 -5
View File
@@ -1,5 +1,11 @@
#!/bin/bash
if [ "$#" -ne 1 ]; then
echo "Illegal number of parameters"
fi
TYPE=$1
my_dir="$(dirname "$0")"
DIR_RETURN=`pwd`
@@ -25,11 +31,13 @@ chown -R www-data:www-data /var/log/$PROJECT_AUTHOR
chmod 0744 /home/$PROJECT_AUTHOR/private/$PROJECT_BUILDNAME/bin/*
# Apache
cat ./os/000-${PROJECT_TYPE}.template.conf |
sed -e "s/§PROJECT_BUILDNAME§/${PROJECT_BUILDNAME}/g" \
> /etc/apache2/sites-available/000-default.conf
if [[ $TYPE == "webserver" ]]; then
cat ./os/000-${PROJECT_TYPE}.template.conf |
sed -e "s/§PROJECT_BUILDNAME§/${PROJECT_BUILDNAME}/g" \
> /etc/apache2/sites-available/000-default.conf
a2enmod rewrite
a2enmod rewrite
fi
# Overwrite opcache default config
cat ./os/opcache.template.ini |
@@ -40,7 +48,7 @@ cat ./os/opcache.template.ini |
cat ./os/php.template.ini > /usr/local/etc/php/php.ini
# Generate Entrypoint
cp "./os/webserver-entrypoint" "/usr/local/bin/$PROJECT_BUILDNAME-entrypoint"
cp "./os/${TYPE}-entrypoint" "/usr/local/bin/$PROJECT_BUILDNAME-entrypoint"
chmod 0744 /usr/local/bin/$PROJECT_BUILDNAME-entrypoint