packer-builds

Packer Builds for LXC and Libvirt
git clone https://git.in0rdr.ch/packer-builds.git
Log | Files | Refs | README

commit 08063bcf8717a13d4e0d7d09536e758184de26cc
parent 8424960f4a35893b01386245d42a2302cb3950f7
Author: Andreas Gruhler <andreas.gruhler@adfinis.com>
Date:   Mon, 28 Sep 2020 23:08:32 +0200

Fix unbound variables

Diffstat:
MREADME.md | 1+
Mscripts/nextcloud.sh | 16++++++++--------
2 files changed, 9 insertions(+), 8 deletions(-)

diff --git a/README.md b/README.md @@ -49,6 +49,7 @@ PACKER_LOG=1 packer build \ -var 'nextcloud_admin_pass=abc' \ -var 'nextcloud_database_pass=456' \ -var 'certbot_mail=root@dev.mail' \ + -var 'overwrite_cli_url=nextcloud.com' \ nextcloud-lxc.json ./deploy-output.sh output-packer-nextcloud nextcloud diff --git a/scripts/nextcloud.sh b/scripts/nextcloud.sh @@ -44,9 +44,9 @@ sed -i 's/;opcache.enable=1/opcache.enable=1/g' /etc/php/7.3/apache2/php.ini # enable apcu cli # https://docs.nextcloud.com/server/latest/admin_manual/configuration_server/caching_configuration.html -cat << EOF > /etc/php/7.3/mods-available/nextcloud-cli.ini -apc.enable_cli=1 -EOF +cat << EOF > /etc/php/7.3/mods-available/nextcloud-cli.ini +apc.enable_cli=1 +EOF ln -s /etc/php/7.3/mods-available/nextcloud-cli.ini /etc/php/7.3/cli/conf.d/99-nexcloud.ini # enable config @@ -60,13 +60,13 @@ a2enmod dir a2enmod mime a2enmod ssl -OCC=/var/www/nextcloud/occ -APACHE_USER=www-data -APACHE_GROUP=www-data +OCC="/var/www/nextcloud/occ" +APACHE_USER="www-data" +APACHE_GROUP="www-data" # status which php -sudo -u www-data php $OCC status +sudo -u "$APACHE_USER" -g "$APACHE_GROUP" php "$OCC" status # install nextcloud sudo -u "$APACHE_USER" -g "$APACHE_GROUP" php "$OCC" maintenance:install \ @@ -75,7 +75,7 @@ sudo -u "$APACHE_USER" -g "$APACHE_GROUP" php "$OCC" maintenance:install \ --admin-user "$NEXTCLOUD_ADMIN_USER" --admin-pass "$NEXTCLOUD_ADMIN_PASSWORD" \ --data-dir "$NEXTCLOUD_DATADIR" || exit 0 -sudo -u www-data php $OCC status +sudo -u "$APACHE_USER" -g "$APACHE_GROUP" php "$OCC" status # set trusted domains urls=($NEXTCLOUD_URLS)