Skip to content

Commit

Permalink
build: fix cleanup armbian images
Browse files Browse the repository at this point in the history
  • Loading branch information
nachoparker committed May 29, 2018
1 parent 6d1cd56 commit 3862eca
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 12 deletions.
4 changes: 2 additions & 2 deletions batch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion build-SD-rpi.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
1 change: 1 addition & 0 deletions etc/ncp-config.d/nc-nextcloud.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down
6 changes: 1 addition & 5 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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.
Expand Down
1 change: 0 additions & 1 deletion lamp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down
6 changes: 3 additions & 3 deletions post-inst.sh
Original file line number Diff line number Diff line change
@@ -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!
Expand All @@ -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
Expand Down
6 changes: 6 additions & 0 deletions update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 3862eca

Please sign in to comment.