diff options
-rwxr-xr-x | batch.sh | 4 | ||||
-rwxr-xr-x | build-SD-rpi.sh | 2 | ||||
-rw-r--r-- | etc/ncp-config.d/nc-nextcloud.sh | 1 | ||||
-rw-r--r-- | install.sh | 6 | ||||
-rw-r--r-- | lamp.sh | 1 | ||||
-rw-r--r-- | post-inst.sh | 6 | ||||
-rwxr-xr-x | update.sh | 6 |
7 files changed, 14 insertions, 12 deletions
@@ -26,8 +26,8 @@ source buildlib.sh # initializes $IMGNAME # Armbian ./build-SD-armbian.sh odroidxu4 OdroidHC2 -./build-SD-armbian.sh rock64 -./build-SD-armbian.sh bananapi +./build-SD-armbian.sh rock64 Rock64 +./build-SD-armbian.sh bananapi Bananapi # Docker x86 docker pull debian:stretch-slim diff --git a/build-SD-rpi.sh b/build-SD-rpi.sh index af2a038b..b238358d 100755 --- a/build-SD-rpi.sh +++ b/build-SD-rpi.sh @@ -11,7 +11,7 @@ set -e source buildlib.sh -IP=${1:-192.168.0.145} # For QEMU automated testing +IP=${1:-192.168.0.145} # For QEMU automated testing (optional) SIZE=3G # Raspbian image size #CLEAN=1 # Pass this envvar to clean download cache IMG="NextCloudPi_RPi_$( date "+%m-%d-%y" ).img" diff --git a/etc/ncp-config.d/nc-nextcloud.sh b/etc/ncp-config.d/nc-nextcloud.sh index 61797e17..ca9eb7b1 100644 --- a/etc/ncp-config.d/nc-nextcloud.sh +++ b/etc/ncp-config.d/nc-nextcloud.sh @@ -94,6 +94,7 @@ ExecStart=/bin/bash /usr/local/bin/ncp-provisioning.sh [Install] WantedBy=multi-user.target EOF + systemctl enable nc-provisioning return 0 } @@ -29,7 +29,6 @@ grep -q -e "Debian GNU/Linux 9" -e "Raspbian GNU/Linux 9" /etc/issue || { } # check installed software -type apache2 &>/dev/null && APACHE_EXISTS=1 type mysqld &>/dev/null && echo ">>> WARNING: existing mysqld configuration will be changed <<<" # get install code @@ -52,10 +51,7 @@ install_script etc/ncp-config.d/nc-nextcloud.sh activate_script etc/ncp-config.d/nc-nextcloud.sh install_script ncp.sh activate_script etc/ncp-config.d/nc-init.sh - -# re-enable mods disabled during install, in case there's other shared services in apache2 -[[ "$APACHE_EXISTS" != "" ]] && \ - a2enmod status reqtimeout env autoindex access_compat auth_basic authn_file authn_core alias access_compat +[[ -f /.ncp-image ]] && activate_script post-inst.sh popd echo "Done. @@ -106,7 +106,6 @@ EOF a2enmod mime a2enmod ssl - a2dismod -f status reqtimeout env autoindex access_compat auth_basic authn_file authn_core alias access_compat echo "ServerName localhost" >> /etc/apache2/apache2.conf diff --git a/post-inst.sh b/post-inst.sh index f7e1690d..7a19640c 100644 --- a/post-inst.sh +++ b/post-inst.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Cleanup step Raspbian image +# Cleanup step NCP image # # Copyleft 2017 by Ignacio Nunez Hernanz <nacho _a_t_ ownyourbits _d_o_t_ com> # GPL licensed (see end of file) * Use at your own risk! @@ -15,8 +15,8 @@ configure() kill $( cat /run/redis/redis-server.pid ) kill $( cat /run/crond.pid ) - # enable randomize passwords - systemctl enable nc-provisioning + # disable unused apache mods + a2dismod status reqtimeout env autoindex access_compat auth_basic authn_file authn_core alias access_compat # cleanup all NCP extras source /usr/local/etc/library.sh @@ -232,6 +232,12 @@ done sed -i 's|NextCloudPlus autogenerated|NextCloudPi autogenerated|' /etc/dhcpcd.conf sed -i 's|NextCloudPlus|NextCloudPi|' /etc/fail2ban/action.d/sendmail-whois-lines.conf + # make sure provisioning is enabled + systemctl -q is-enabled nc-provisioning || { + systemctl start nc-provisioning + systemctl enable nc-provisioning + } + } # end - only live updates exit 0 |