Skip to content

Commit 3862eca

Browse files
committed
build: fix cleanup armbian images
1 parent 6d1cd56 commit 3862eca

File tree

7 files changed

+14
-12
lines changed

7 files changed

+14
-12
lines changed

batch.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ source buildlib.sh # initializes $IMGNAME
2626

2727
# Armbian
2828
./build-SD-armbian.sh odroidxu4 OdroidHC2
29-
./build-SD-armbian.sh rock64
30-
./build-SD-armbian.sh bananapi
29+
./build-SD-armbian.sh rock64 Rock64
30+
./build-SD-armbian.sh bananapi Bananapi
3131

3232
# Docker x86
3333
docker pull debian:stretch-slim

build-SD-rpi.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
set -e
1212
source buildlib.sh
1313

14-
IP=${1:-192.168.0.145} # For QEMU automated testing
14+
IP=${1:-192.168.0.145} # For QEMU automated testing (optional)
1515
SIZE=3G # Raspbian image size
1616
#CLEAN=1 # Pass this envvar to clean download cache
1717
IMG="NextCloudPi_RPi_$( date "+%m-%d-%y" ).img"

etc/ncp-config.d/nc-nextcloud.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ ExecStart=/bin/bash /usr/local/bin/ncp-provisioning.sh
9494
[Install]
9595
WantedBy=multi-user.target
9696
EOF
97+
systemctl enable nc-provisioning
9798
return 0
9899
}
99100

install.sh

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ grep -q -e "Debian GNU/Linux 9" -e "Raspbian GNU/Linux 9" /etc/issue || {
2929
}
3030

3131
# check installed software
32-
type apache2 &>/dev/null && APACHE_EXISTS=1
3332
type mysqld &>/dev/null && echo ">>> WARNING: existing mysqld configuration will be changed <<<"
3433

3534
# get install code
@@ -52,10 +51,7 @@ install_script etc/ncp-config.d/nc-nextcloud.sh
5251
activate_script etc/ncp-config.d/nc-nextcloud.sh
5352
install_script ncp.sh
5453
activate_script etc/ncp-config.d/nc-init.sh
55-
56-
# re-enable mods disabled during install, in case there's other shared services in apache2
57-
[[ "$APACHE_EXISTS" != "" ]] && \
58-
a2enmod status reqtimeout env autoindex access_compat auth_basic authn_file authn_core alias access_compat
54+
[[ -f /.ncp-image ]] && activate_script post-inst.sh
5955

6056
popd
6157
echo "Done.

lamp.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,6 @@ EOF
106106
a2enmod mime
107107
a2enmod ssl
108108

109-
a2dismod -f status reqtimeout env autoindex access_compat auth_basic authn_file authn_core alias access_compat
110109
echo "ServerName localhost" >> /etc/apache2/apache2.conf
111110

112111

post-inst.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/bash
22

3-
# Cleanup step Raspbian image
3+
# Cleanup step NCP image
44
#
55
# Copyleft 2017 by Ignacio Nunez Hernanz <nacho _a_t_ ownyourbits _d_o_t_ com>
66
# GPL licensed (see end of file) * Use at your own risk!
@@ -15,8 +15,8 @@ configure()
1515
kill $( cat /run/redis/redis-server.pid )
1616
kill $( cat /run/crond.pid )
1717

18-
# enable randomize passwords
19-
systemctl enable nc-provisioning
18+
# disable unused apache mods
19+
a2dismod status reqtimeout env autoindex access_compat auth_basic authn_file authn_core alias access_compat
2020

2121
# cleanup all NCP extras
2222
source /usr/local/etc/library.sh

update.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,12 @@ done
232232
sed -i 's|NextCloudPlus autogenerated|NextCloudPi autogenerated|' /etc/dhcpcd.conf
233233
sed -i 's|NextCloudPlus|NextCloudPi|' /etc/fail2ban/action.d/sendmail-whois-lines.conf
234234

235+
# make sure provisioning is enabled
236+
systemctl -q is-enabled nc-provisioning || {
237+
systemctl start nc-provisioning
238+
systemctl enable nc-provisioning
239+
}
240+
235241
} # end - only live updates
236242

237243
exit 0

0 commit comments

Comments
 (0)