Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/nextcloudpi.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornachoparker <nacho@ownyourbits.com>2018-10-24 22:52:43 +0300
committernachoparker <nacho@ownyourbits.com>2018-10-27 05:27:03 +0300
commit26083e9b753c564fe37fd0927c5ef36d0cd4bdb1 (patch)
tree54cb503006e04aa9ef97b7006ba1915dae9f2218
parent54e5c21f1c370ab6e3f0a4a95c7c9e7e6d1bd929 (diff)
update: update sourcesv0.64.10
-rw-r--r--changelog.md6
-rwxr-xr-xupdate.sh140
2 files changed, 29 insertions, 117 deletions
diff --git a/changelog.md b/changelog.md
index b75f3319..25e0bf7a 100644
--- a/changelog.md
+++ b/changelog.md
@@ -1,7 +1,9 @@
-[v0.64.9](https://github.com/nextcloud/nextcloudpi/commit/f2930ca) (2018-10-23) ncp-config: use simple characters
+[v0.64.10](https://github.com/nextcloud/nextcloudpi/commit/f836c87) (2018-10-24) update: update sources
-[v0.64.8](https://github.com/nextcloud/nextcloudpi/commit/dceacdf) (2018-10-22) ncp-web: update chinese translations
+[v0.64.9](https://github.com/nextcloud/nextcloudpi/commit/b847ad4) (2018-10-23) ncp-config: use simple characters
+
+[v0.64.8 ](https://github.com/nextcloud/nextcloudpi/commit/dceacdf) (2018-10-22) ncp-web: update chinese translations
[v0.64.7 ](https://github.com/nextcloud/nextcloudpi/commit/20a4147) (2018-10-21) ncp-web: update chinese translations
diff --git a/update.sh b/update.sh
index f4b5021d..f891460d 100755
--- a/update.sh
+++ b/update.sh
@@ -45,14 +45,6 @@ source /usr/local/etc/library.sh
mkdir -p "$CONFDIR"
-# rename DDNS entries TODO temporary
-[[ -f "$CONFDIR"/no-ip.sh ]] && {
- mv "$CONFDIR"/no-ip.sh "$CONFDIR"/DDNS_no-ip.sh
- mv "$CONFDIR"/freeDNS.sh "$CONFDIR"/DDNS_freeDNS.sh
- mv "$CONFDIR"/duckDNS.sh "$CONFDIR"/DDNS_duckDNS.sh
- mv "$CONFDIR"/spDYN.sh "$CONFDIR"/DDNS_spDYN.sh
-}
-
# prevent installing some apt packages in the docker version
[[ -f /.docker-image ]] && {
for opt in $EXCL_DOCKER; do
@@ -136,35 +128,15 @@ persistent_cfg /etc/cron.weekly
exit 0
EOF
- /etc/services-available.d/000ncp
- rm /data/etc/letsencrypt/live
- mv /data/etc/live /data/etc/letsencrypt
-
sed -i 's|exit 1|exit 0|' /usr/local/sbin/update-rc.d
}
}
# for non docker images
[[ ! -f /.docker-image ]] && {
- # fix locale for Armbian images, for ncp-config
- [[ "$LANG" == "" ]] && localectl set-locale LANG=en_US.utf8
- }
-
- # no-origin policy for enhanced privacy
- grep -q "Referrer-Policy" /etc/apache2/apache2.conf || {
- cat >> /etc/apache2/apache2.conf <<EOF
-<IfModule mod_headers.c>
- Header always set Referrer-Policy "no-referrer"
-</IfModule>
-EOF
+ :
}
- # NC14 doesnt support php mail
- mail_smtpmode=$(sudo -u www-data php /var/www/nextcloud/occ config:system:get mail_smtpmode)
- [[ $mail_smtpmode == "php" ]] && {
- sudo -u www-data php /var/www/nextcloud/occ config:system:set mail_smtpmode --value="sendmail"
- }
-
# Reinstall DDNS_spDYN for use of IPv6
rm -r /usr/local/etc/spdnsupdater
cd /usr/local/etc/ncp-config.d
@@ -176,16 +148,6 @@ EOF
install_script nc-restore.sh
cd - &>/dev/null
- # install preview generator
- sudo -u www-data php /var/www/nextcloud/occ app:install previewgenerator
- sudo -u www-data php /var/www/nextcloud/occ app:enable previewgenerator
-
- # use separate db config file
- [[ -f /etc/mysql/mariadb.conf.d/90-ncp.cnf ]] || {
- cp /etc/mysql/mariadb.conf.d/50-server.cnf /etc/mysql/mariadb.conf.d/90-ncp.cnf
- service mysql restart
- }
-
# update to NC14.0.3
F="$CONFDIR"/nc-autoupdate-nc.sh
grep -q '^ACTIVE_=yes$' "$F" && {
@@ -194,82 +156,6 @@ EOF
cd - &>/dev/null
}
- # PHP7.2
- [[ -e /etc/php/7.2 ]] || {
- PHPVER=7.2
- APTINSTALL="apt-get install -y --no-install-recommends"
- export DEBIAN_FRONTEND=noninteractive
-
- ncc maintenance:mode --on
-
- [[ -f /usr/bin/raspi-config ]] && {
- apt-get update
- $APTINSTALL apt-transport-https
-
- echo "deb https://deb.debian.org/debian buster main contrib non-free" > /etc/apt/sources.list.d/ncp-buster.list
- apt-get --allow-unauthenticated update
- $APTINSTALL --allow-unauthenticated debian-archive-keyring
- }
-
- echo "deb http://deb.debian.org/debian buster main contrib non-free" > /etc/apt/sources.list.d/ncp-buster.list
-cat > /etc/apt/preferences.d/10-ncp-buster <<EOF
-Package: *
-Pin: release n=stretch
-Pin-Priority: 600
-EOF
- apt-get update
-
- apt-get purge -y php7.0-*
- apt-get autoremove -y
-
- $APTINSTALL -t buster php${PHPVER} php${PHPVER}-curl php${PHPVER}-gd php${PHPVER}-fpm php${PHPVER}-cli php${PHPVER}-opcache \
- php${PHPVER}-mbstring php${PHPVER}-xml php${PHPVER}-zip php${PHPVER}-fileinfo php${PHPVER}-ldap \
- php${PHPVER}-intl php${PHPVER}-bz2 php${PHPVER}-json
-
- $APTINSTALL php${PHPVER}-mysql
- $APTINSTALL -t buster php${PHPVER}-redis
- $APTINSTALL -t buster php-smbclient # for external storage
- $APTINSTALL -t buster imagemagick php${PHPVER}-imagick php${PHPVER}-exif # for gallery
-
- cat > /etc/php/${PHPVER}/mods-available/opcache.ini <<EOF
-zend_extension=opcache.so
-opcache.enable=1
-opcache.enable_cli=1
-opcache.fast_shutdown=1
-opcache.interned_strings_buffer=8
-opcache.max_accelerated_files=10000
-opcache.memory_consumption=128
-opcache.save_comments=1
-opcache.revalidate_freq=1
-opcache.file_cache=/tmp;
-EOF
- a2enconf php${PHPVER}-fpm
-
-
- DATADIR="$( grep datadirectory /var/www/nextcloud/config/config.php | awk '{ print $3 }' | grep -oP "[^']*[^']" | head -1 )"
- UPLOADTMPDIR="$DATADIR"/tmp
- sed -i "s|^;\?upload_tmp_dir =.*$|upload_tmp_dir = $UPLOADTMPDIR|" /etc/php/${PHPVER}/cli/php.ini
- sed -i "s|^;\?upload_tmp_dir =.*$|upload_tmp_dir = $UPLOADTMPDIR|" /etc/php/${PHPVER}/fpm/php.ini
- sed -i "s|^;\?sys_temp_dir =.*$|sys_temp_dir = $UPLOADTMPDIR|" /etc/php/${PHPVER}/fpm/php.ini
-
- OPCACHEDIR="$DATADIR"/.opcache
- sed -i "s|^opcache.file_cache=.*|opcache.file_cache=$OPCACHEDIR|" /etc/php/${PHPVER}/mods-available/opcache.ini
-
- apt-get autoremove -y
-
- ncc maintenance:mode --off
-
- bash -c "sleep 5 && service apache2 restart" &>/dev/null &
- bash -c " sleep 3
- service php${PHPVER}-fpm stop
- service mysql stop
- sleep 0.5
- service php${PHPVER}-fpm start
- service mysql start
- " &>/dev/null &
-
- } # PHP7.2 end
-
# Redis eviction policy
grep -q "^maxmemory-policy allkeys-lru" /etc/redis/redis.conf || {
sed -i 's|# maxmemory-policy .*|maxmemory-policy allkeys-lru|' /etc/redis/redis.conf
@@ -304,6 +190,30 @@ EOF
}
EOF
+ # Adjust sources
+ ## Raspbian
+ if [[ -f /usr/bin/raspi-config ]]; then
+ echo "deb http://mirrordirector.raspbian.org/raspbian/ buster main contrib non-free rpi" > /etc/apt/sources.list.d/ncp-buster.list
+
+ ## x86
+ elif [[ "$(uname -m)" == "x86_64" ]]; then
+ apt-get update
+ apt-get install -y --no-install-recommends apt-transport-https gnupg
+ echo "deb https://packages.sury.org/php/ stretch main" > /etc/apt/sources.list.d/php.list
+ wget -q https://packages.sury.org/php/apt.gpg -O- | apt-key add -
+ rm -f /etc/apt/preferences.d/10-ncp-buster
+
+ ## armhf
+ else
+ echo "deb http://deb.debian.org/debian buster main contrib non-free" > /etc/apt/sources.list.d/ncp-buster.list
+ cat > /etc/apt/preferences.d/10-ncp-buster <<EOF
+Package: *
+Pin: release n=stretch
+Pin-Priority: 600
+EOF
+ fi
+
+
} # end - only live updates
exit 0