mirror of
https://github.com/nextcloud/nextcloudpi.git
synced 2026-01-10 15:12:01 -03:30
build: fix cleanup armbian images
This commit is contained in:
parent
6d1cd56883
commit
3862eca0ed
4
batch.sh
4
batch.sh
@ -26,8 +26,8 @@ source buildlib.sh # initializes $IMGNAME
|
|||||||
|
|
||||||
# Armbian
|
# Armbian
|
||||||
./build-SD-armbian.sh odroidxu4 OdroidHC2
|
./build-SD-armbian.sh odroidxu4 OdroidHC2
|
||||||
./build-SD-armbian.sh rock64
|
./build-SD-armbian.sh rock64 Rock64
|
||||||
./build-SD-armbian.sh bananapi
|
./build-SD-armbian.sh bananapi Bananapi
|
||||||
|
|
||||||
# Docker x86
|
# Docker x86
|
||||||
docker pull debian:stretch-slim
|
docker pull debian:stretch-slim
|
||||||
|
|||||||
@ -11,7 +11,7 @@
|
|||||||
set -e
|
set -e
|
||||||
source buildlib.sh
|
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
|
SIZE=3G # Raspbian image size
|
||||||
#CLEAN=1 # Pass this envvar to clean download cache
|
#CLEAN=1 # Pass this envvar to clean download cache
|
||||||
IMG="NextCloudPi_RPi_$( date "+%m-%d-%y" ).img"
|
IMG="NextCloudPi_RPi_$( date "+%m-%d-%y" ).img"
|
||||||
|
|||||||
@ -94,6 +94,7 @@ ExecStart=/bin/bash /usr/local/bin/ncp-provisioning.sh
|
|||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
EOF
|
EOF
|
||||||
|
systemctl enable nc-provisioning
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -29,7 +29,6 @@ grep -q -e "Debian GNU/Linux 9" -e "Raspbian GNU/Linux 9" /etc/issue || {
|
|||||||
}
|
}
|
||||||
|
|
||||||
# check installed software
|
# check installed software
|
||||||
type apache2 &>/dev/null && APACHE_EXISTS=1
|
|
||||||
type mysqld &>/dev/null && echo ">>> WARNING: existing mysqld configuration will be changed <<<"
|
type mysqld &>/dev/null && echo ">>> WARNING: existing mysqld configuration will be changed <<<"
|
||||||
|
|
||||||
# get install code
|
# 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
|
activate_script etc/ncp-config.d/nc-nextcloud.sh
|
||||||
install_script ncp.sh
|
install_script ncp.sh
|
||||||
activate_script etc/ncp-config.d/nc-init.sh
|
activate_script etc/ncp-config.d/nc-init.sh
|
||||||
|
[[ -f /.ncp-image ]] && activate_script post-inst.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
|
|
||||||
|
|
||||||
popd
|
popd
|
||||||
echo "Done.
|
echo "Done.
|
||||||
|
|||||||
1
lamp.sh
1
lamp.sh
@ -106,7 +106,6 @@ EOF
|
|||||||
a2enmod mime
|
a2enmod mime
|
||||||
a2enmod ssl
|
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
|
echo "ServerName localhost" >> /etc/apache2/apache2.conf
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# Cleanup step Raspbian image
|
# Cleanup step NCP image
|
||||||
#
|
#
|
||||||
# Copyleft 2017 by Ignacio Nunez Hernanz <nacho _a_t_ ownyourbits _d_o_t_ com>
|
# 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!
|
# 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/redis/redis-server.pid )
|
||||||
kill $( cat /run/crond.pid )
|
kill $( cat /run/crond.pid )
|
||||||
|
|
||||||
# enable randomize passwords
|
# disable unused apache mods
|
||||||
systemctl enable nc-provisioning
|
a2dismod status reqtimeout env autoindex access_compat auth_basic authn_file authn_core alias access_compat
|
||||||
|
|
||||||
# cleanup all NCP extras
|
# cleanup all NCP extras
|
||||||
source /usr/local/etc/library.sh
|
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 autogenerated|NextCloudPi autogenerated|' /etc/dhcpcd.conf
|
||||||
sed -i 's|NextCloudPlus|NextCloudPi|' /etc/fail2ban/action.d/sendmail-whois-lines.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
|
} # end - only live updates
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user