WIP Items module.

This commit is contained in:
Ahmed Bouhuolia
2019-09-03 02:07:28 +02:00
parent cb8c294d74
commit 70809cb05c
142 changed files with 12674 additions and 64 deletions

View File

@@ -0,0 +1,20 @@
#!/bin/bash
for conf in /usr/local/apache2/templates/*.conf; do
mv $conf "/usr/local/apache2/sites-available/"$(basename $conf) > /dev/null
done
for template in /usr/local/apache2/templates/*.template; do
mv $template "/usr/local/apache2/sites-available/"$(basename $template)".conf" > /dev/null
done
if [[ "$NO_DEFAULT" = true ]]; then
rm /usr/local/apache2/sites-available/node.template.conf
rm /usr/local/apache2/sites-available/node-https.template.conf
else
if [[ "$WEB_SSL" = false ]]; then
rm /usr/local/apache2/sites-available/node-https.template.conf
fi
fi
. /root/scripts/run-openssl.sh

View File

@@ -0,0 +1,31 @@
#!/bin/bash
if [[ "$WEB_SSL" = true && "$NO_DEFAULT" = false ]]; then
if [[ "$SELF_SIGNED" = true ]]; then
echo "---------------------------------------------------------"
echo "APACHE: Generating certificates"
echo "---------------------------------------------------------"
openssl req \
-new \
-newkey rsa:4096 \
-days 1095 \
-nodes \
-x509 \
-subj "/C=FK/ST=Fake/L=Fake/O=Fake/CN=0.0.0.0" \
-keyout /etc/ssl/privkey1.pem \
-out /etc/ssl/cert1.pem
chown www-data:www-data /etc/ssl/cert1.pem
chown www-data:www-data /etc/ssl/privkey1.pem
else
echo "---------------------------------------------------------"
echo "APACHE: Using certificates in 'nodock/apache/certs/'"
echo "---------------------------------------------------------"
if [ -e /var/certs/cert1.pem ]; then
cp /var/certs/cert1.pem /etc/ssl/cert1.pem
fi
if [ -e /var/certs/privkey1.pem ]; then
cp /var/certs/privkey1.pem /etc/ssl/privkey1.pem
fi
fi
fi