diff options
30 files changed, 11 insertions, 50 deletions
@@ -10,7 +10,7 @@ This code also generates the [NextCloudPi ARM docker image](https://hub.docker.c ## Features -* Raspbian 8 Jessie +* Raspbian 9 Stretch * Nextcloud 12 * Apache 2.4.25, with HTTP2 enabled * PHP 7.0 (double the speed of PHP5!) @@ -1,7 +1,6 @@ #!/bin/bash # Batch creation of NextCloudPi image -# Tested with 2017-03-02-raspbian-jessie-lite.img # # 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! diff --git a/docker/docker-env.sh b/docker/docker-env.sh index 9320375a..0ef112ce 100644 --- a/docker/docker-env.sh +++ b/docker/docker-env.sh @@ -1,7 +1,6 @@ #!/bin/bish # Install docker ARM on Raspbian -# Tested with 2017-03-02-raspbian-jessie-lite.img # # 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! diff --git a/etc/nextcloudpi-config.d/modsecurity.sh b/etc/nextcloudpi-config.d/modsecurity.sh index 08250096..c5d4bb3b 100644 --- a/etc/nextcloudpi-config.d/modsecurity.sh +++ b/etc/nextcloudpi-config.d/modsecurity.sh @@ -24,12 +24,7 @@ install() apt-get install -y --no-install-recommends libapache2-mod-security2 modsecurity-crs a2dismod security2 - # COPY RULES - cd /usr/share/modsecurity-crs/base_rules/ - for ruleFile in * ; do sudo ln -s /usr/share/modsecurity-crs/base_rules/$ruleFile /etc/modsecurity/$ruleFile ; done - cd /usr/share/modsecurity-crs/optional_rules/ - for ruleFile in * ; do sudo ln -s /usr/share/modsecurity-crs/optional_rules/$ruleFile /etc/modsecurity/$ruleFile ; done - rm /etc/modsecurity/modsecurity_crs_16_session_hijacking.conf # https://github.com/SpiderLabs/owasp-modsecurity-crs/commit/e2fbef4ce89fed0c4dd338002b9a090dd2f6491d + #FIXME - after migration to Stretch is done # CONFIGURE cp /etc/modsecurity/modsecurity.conf-recommended /etc/modsecurity/modsecurity.conf diff --git a/etc/nextcloudpi-config.d/nc-datadir.sh b/etc/nextcloudpi-config.d/nc-datadir.sh index 446df1be..460b3e06 100644 --- a/etc/nextcloudpi-config.d/nc-datadir.sh +++ b/etc/nextcloudpi-config.d/nc-datadir.sh @@ -1,7 +1,6 @@ #!/bin/bash # Data dir configuration script for NextCloudPi -# Tested with 2017-03-02-raspbian-jessie-lite.img # # 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! diff --git a/etc/nextcloudpi-config.d/nc-format-USB.sh b/etc/nextcloudpi-config.d/nc-format-USB.sh index b219e669..259f6fbd 100644 --- a/etc/nextcloudpi-config.d/nc-format-USB.sh +++ b/etc/nextcloudpi-config.d/nc-format-USB.sh @@ -1,7 +1,6 @@ #!/bin/bash # Format a USB external drive as a unique ext4 partition -# Tested with 2017-03-02-raspbian-jessie-lite.img # # 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! diff --git a/etc/nextcloudpi-config.d/nc-forward-ports.sh b/etc/nextcloudpi-config.d/nc-forward-ports.sh index af158f64..c16631b5 100644 --- a/etc/nextcloudpi-config.d/nc-forward-ports.sh +++ b/etc/nextcloudpi-config.d/nc-forward-ports.sh @@ -1,7 +1,6 @@ #!/bin/bash # Use uPnP to forward router ports for NextCloudPi -# Tested with 2017-03-02-raspbian-jessie-lite.img # # 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! diff --git a/etc/nextcloudpi-config.d/nc-httpsonly.sh b/etc/nextcloudpi-config.d/nc-httpsonly.sh index 7986e141..02b57d72 100644 --- a/etc/nextcloudpi-config.d/nc-httpsonly.sh +++ b/etc/nextcloudpi-config.d/nc-httpsonly.sh @@ -1,7 +1,6 @@ #!/bin/bash # HTTPS rewrite configuration script for NextCloudPi -# Tested with 2017-03-02-raspbian-jessie-lite.img # # 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! diff --git a/etc/nextcloudpi-config.d/nc-init.sh b/etc/nextcloudpi-config.d/nc-init.sh index 77430b42..a9007b96 100644 --- a/etc/nextcloudpi-config.d/nc-init.sh +++ b/etc/nextcloudpi-config.d/nc-init.sh @@ -1,7 +1,6 @@ #!/bin/bash # Init NextCloud database and perform initial configuration -# Tested with 2017-03-02-raspbian-jessie-lite.img # # 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! diff --git a/etc/nextcloudpi-config.d/nc-limits.sh b/etc/nextcloudpi-config.d/nc-limits.sh index 4bea68ad..50292f2c 100644 --- a/etc/nextcloudpi-config.d/nc-limits.sh +++ b/etc/nextcloudpi-config.d/nc-limits.sh @@ -1,7 +1,6 @@ #!/bin/bash # System limit configurator for NextCloudPi -# Tested with 2017-03-02-raspbian-jessie-lite.img # # 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! diff --git a/etc/nextcloudpi-config.d/nc-news.sh b/etc/nextcloudpi-config.d/nc-news.sh index 4627590e..229f783c 100644 --- a/etc/nextcloudpi-config.d/nc-news.sh +++ b/etc/nextcloudpi-config.d/nc-news.sh @@ -1,7 +1,6 @@ #!/bin/bash # Install the latest News third party app -# Tested with 2017-03-02-raspbian-jessie-lite.img # # 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! diff --git a/etc/nextcloudpi-config.d/nc-nextcloud.sh b/etc/nextcloudpi-config.d/nc-nextcloud.sh index 92d59ece..57681b19 100644 --- a/etc/nextcloudpi-config.d/nc-nextcloud.sh +++ b/etc/nextcloudpi-config.d/nc-nextcloud.sh @@ -1,7 +1,6 @@ #!/bin/bash # Nextcloud installation on Raspbian over LAMP base -# Tested with 2017-03-02-raspbian-jessie-lite.img # # 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! diff --git a/etc/nextcloudpi-config.d/nc-notify-updates.sh b/etc/nextcloudpi-config.d/nc-notify-updates.sh index f30fba4b..ffcd3f9a 100644 --- a/etc/nextcloudpi-config.d/nc-notify-updates.sh +++ b/etc/nextcloudpi-config.d/nc-notify-updates.sh @@ -1,7 +1,6 @@ #!/bin/bash # Install the latest News third party app -# Tested with 2017-03-02-raspbian-jessie-lite.img # # 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! diff --git a/etc/nextcloudpi-config.d/nc-ramlogs.sh b/etc/nextcloudpi-config.d/nc-ramlogs.sh index aaf917be..a9690bc2 100644 --- a/etc/nextcloudpi-config.d/nc-ramlogs.sh +++ b/etc/nextcloudpi-config.d/nc-ramlogs.sh @@ -1,7 +1,6 @@ #!/bin/bash # Data dir configuration script for NextCloudPi -# Tested with 2017-03-02-raspbian-jessie-lite.img # # 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! diff --git a/etc/nextcloudpi-config.d/nc-restore.sh b/etc/nextcloudpi-config.d/nc-restore.sh index 9ca9039a..faadf429 100644 --- a/etc/nextcloudpi-config.d/nc-restore.sh +++ b/etc/nextcloudpi-config.d/nc-restore.sh @@ -2,7 +2,6 @@ #!/bin/bash # Nextcloud restore backup -# Tested with 2017-03-02-raspbian-jessie-lite.img # # 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! diff --git a/etc/nextcloudpi-config.d/nc-scan-auto.sh b/etc/nextcloudpi-config.d/nc-scan-auto.sh index d57bf97b..183904c8 100644 --- a/etc/nextcloudpi-config.d/nc-scan-auto.sh +++ b/etc/nextcloudpi-config.d/nc-scan-auto.sh @@ -1,7 +1,6 @@ #!/bin/bash # Periodically synchronize NextCloud for externally modified files -# Tested with 2017-03-02-raspbian-jessie-lite.img # # 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! diff --git a/etc/nextcloudpi-config.d/nc-scan.sh b/etc/nextcloudpi-config.d/nc-scan.sh index a3a11667..5bf236cb 100644 --- a/etc/nextcloudpi-config.d/nc-scan.sh +++ b/etc/nextcloudpi-config.d/nc-scan.sh @@ -1,7 +1,6 @@ #!/bin/bash # Synchronize NextCloud for externally modified files -# Tested with 2017-03-02-raspbian-jessie-lite.img # # 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! diff --git a/etc/nextcloudpi-config.d/nc-swapfile.sh b/etc/nextcloudpi-config.d/nc-swapfile.sh index 82e781df..3a890ca8 100644 --- a/etc/nextcloudpi-config.d/nc-swapfile.sh +++ b/etc/nextcloudpi-config.d/nc-swapfile.sh @@ -1,7 +1,6 @@ #!/bin/bash # Data dir configuration script for NextCloudPi -# Tested with 2017-03-02-raspbian-jessie-lite.img # # 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! diff --git a/etc/nextcloudpi-config.d/nc-update.sh b/etc/nextcloudpi-config.d/nc-update.sh index 3a0d5f2e..3addbe62 100644 --- a/etc/nextcloudpi-config.d/nc-update.sh +++ b/etc/nextcloudpi-config.d/nc-update.sh @@ -1,7 +1,6 @@ #!/bin/bash # Data dir configuration script for NextCloudPi -# Tested with 2017-03-02-raspbian-jessie-lite.img # # 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! diff --git a/etc/nextcloudpi-config.d/nc-wifi.sh b/etc/nextcloudpi-config.d/nc-wifi.sh index 5432c1f6..e4583b6a 100644 --- a/etc/nextcloudpi-config.d/nc-wifi.sh +++ b/etc/nextcloudpi-config.d/nc-wifi.sh @@ -1,7 +1,6 @@ #!/bin/bash # Data dir configuration script for NextCloudPi -# Tested with 2017-03-02-raspbian-jessie-lite.img # # 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! diff --git a/etc/nextcloudpi-config.d/no-ip.sh b/etc/nextcloudpi-config.d/no-ip.sh index 85af8ba4..08e948f2 100644 --- a/etc/nextcloudpi-config.d/no-ip.sh +++ b/etc/nextcloudpi-config.d/no-ip.sh @@ -1,7 +1,6 @@ #!/bin/bash # no-ip.org installation on Raspbian -# Tested with 2017-03-02-raspbian-jessie-lite.img # # 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! @@ -37,7 +36,7 @@ install() mkdir /tmp/noip && cd /tmp/noip wget http://www.no-ip.com/client/linux/noip-duc-linux.tar.gz tar vzxf noip-duc-linux.tar.gz - cd -; cd $OLDPWD/noip-* + cd -; cd $OLDPWD/noip-2* make cp noip2 /usr/local/bin/ diff --git a/etc/nextcloudpi-config.d/samba.sh b/etc/nextcloudpi-config.d/samba.sh index d14939a6..0903caea 100644 --- a/etc/nextcloudpi-config.d/samba.sh +++ b/etc/nextcloudpi-config.d/samba.sh @@ -1,7 +1,6 @@ #!/bin/bash # SAMBA server for Raspbian -# Tested with 2017-03-02-raspbian-jessie-lite.img # # 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! diff --git a/etc/nextcloudpi-config.d/unattended-upgrades.sh b/etc/nextcloudpi-config.d/unattended-upgrades.sh index 93b33df4..e286bb37 100644 --- a/etc/nextcloudpi-config.d/unattended-upgrades.sh +++ b/etc/nextcloudpi-config.d/unattended-upgrades.sh @@ -1,7 +1,6 @@ #!/bin/bash # Unattended upgrades installation on Raspbian -# Tested with 2017-03-02-raspbian-jessie-lite.img # # 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! @@ -39,7 +38,6 @@ APT::Periodic::AutocleanInterval "7"; Unattended-Upgrade::Automatic-Reboot "$AUTOREBOOT"; Unattended-Upgrade::Automatic-Reboot-Time "04:00"; Unattended-Upgrade::Origins-Pattern { -o=Raspbian,n=jessie,l=Raspbian; o=Raspbian,n=stretch,l=Raspbian; } EOF diff --git a/installer.sh b/installer.sh index b170126b..027d4a16 100755 --- a/installer.sh +++ b/installer.sh @@ -1,7 +1,6 @@ #!/bin/bash # Generic software installer for Raspbian. Online on a running RPi, or offline with QEMU. -# Tested with 2017-03-02-raspbian-jessie-lite.img # # 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! @@ -1,7 +1,6 @@ #!/bin/bash # Nextcloud LAMP base installation on Raspbian -# Tested with 2017-03-02-raspbian-jessie-lite.img # # 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! @@ -25,24 +24,15 @@ export DEBIAN_FRONTEND=noninteractive install() { - # GET STRETCH SOURCES FOR HTTP2 AND PHP7 - ########################################## - - echo "deb http://mirrordirector.raspbian.org/raspbian/ stretch main contrib non-free rpi" >> /etc/apt/sources.list - cat > /etc/apt/preferences <<EOF -Package: * -Pin: release n=jessie -Pin-Priority: 600 -EOF apt-get update - # INSTALL FROM STRETCH + # INSTALL ########################################## $APTINSTALL apt-utils $APTINSTALL cron - $APTINSTALL -t stretch apache2 - $APTINSTALL -t stretch php7.0 php7.0-curl php7.0-gd php7.0-fpm php7.0-cli php7.0-opcache php7.0-mbstring php7.0-xml php7.0-zip php7.0-APC + $APTINSTALL apache2 + $APTINSTALL php7.0 php7.0-curl php7.0-gd php7.0-fpm php7.0-cli php7.0-opcache php7.0-mbstring php7.0-xml php7.0-zip php7.0-APC mkdir -p /run/php # Randomize mariaDB password @@ -53,7 +43,7 @@ EOF debconf-set-selections <<< "mariadb-server-5.5 mysql-server/root_password password $DBPASSWD" debconf-set-selections <<< "mariadb-server-5.5 mysql-server/root_password_again password $DBPASSWD" - $APTINSTALL -t stretch mariadb-server php7.0-mysql + $APTINSTALL mariadb-server php7.0-mysql mkdir -p /run/mysqld chown mysql /run/mysqld diff --git a/nextcloudpi.sh b/nextcloudpi.sh index ef066106..abfd5a07 100644 --- a/nextcloudpi.sh +++ b/nextcloudpi.sh @@ -67,6 +67,7 @@ EOF # NEXTCLOUDPI MOTD ########################################## + rm -rf /etc/update-motd.d mkdir /etc/update-motd.d rm /etc/motd ln -s /var/run/motd /etc/motd @@ -129,13 +130,15 @@ EOF sed -i "s|^;\?upload_tmp_dir =.*$|upload_tmp_dir = $UPLOADTMPDIR|" /etc/php/7.0/fpm/php.ini sed -i "s|^;\?sys_temp_dir =.*$|sys_temp_dir = $UPLOADTMPDIR|" /etc/php/7.0/fpm/php.ini + touch /usr/local/etc/nextcloudpi-config.d/modsecurity.sh # TODO fix after migration to Stretch is done + # update to latest version from github as part of the build process wget https://raw.githubusercontent.com/nextcloud/nextcloudpi/master/bin/ncp-update -O /usr/local/bin/ncp-update chmod a+x /usr/local/bin/ncp-update /usr/local/bin/ncp-update # External requirements for Apps - #$APTINSTALL -o "Dpkg::Options::=--force-confold" -t stretch php-smbclient # TODO breaks samba + $APTINSTALL -o "Dpkg::Options::=--force-confold" php-smbclient } configure() { :; } diff --git a/prepare-build-env-docker.sh b/prepare-build-env-docker.sh index afe9d731..6d236ce7 100755 --- a/prepare-build-env-docker.sh +++ b/prepare-build-env-docker.sh @@ -1,7 +1,6 @@ #!/bin/bash # Create a Raspbian image with docker -# Tested with 2017-03-02-raspbian-jessie-lite.img # # 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! @@ -1,7 +1,6 @@ #!/bin/bish # Prepare a Raspbian image (resize and update) -# Tested with 2017-03-02-raspbian-jessie-lite.img # # 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! diff --git a/remote-update.sh b/remote-update.sh index 55190889..21b525e2 100644 --- a/remote-update.sh +++ b/remote-update.sh @@ -1,7 +1,6 @@ #!/bin/bash # Perform a software update in NextCloudPi -# Tested with 2017-03-02-raspbian-jessie-lite.img # # 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! @@ -1,7 +1,6 @@ #!/bin/bash # Updaterfor NextCloudPi -# Tested with 2017-03-02-raspbian-jessie-lite.img # # 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! |