mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-15 12:20:31 +00:00
WIP Items module.
This commit is contained in:
20
docker/apache/scripts/build-apache.sh
Normal file
20
docker/apache/scripts/build-apache.sh
Normal 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
|
||||
31
docker/apache/scripts/run-openssl.sh
Normal file
31
docker/apache/scripts/run-openssl.sh
Normal 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
|
||||
|
||||
Reference in New Issue
Block a user