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-06-14 09:45:34 +0300
committernachoparker <nacho@ownyourbits.com>2018-06-14 09:47:13 +0300
commitcef7cb456ba2ad1c75aea8897744f42a7f524026 (patch)
treecdfd48272a9291fddf0667d18bc252a21c90cbee
parent598e1c87e5677961ef2e133abc460fd396b395a4 (diff)
nc-restore: fix redis restart in dockerv0.56.22
-rw-r--r--changelog.md4
-rw-r--r--etc/ncp-config.d/nc-restore.sh2
-rwxr-xr-xupdate.sh43
3 files changed, 11 insertions, 38 deletions
diff --git a/changelog.md b/changelog.md
index 051a084c..2ada2e17 100644
--- a/changelog.md
+++ b/changelog.md
@@ -1,5 +1,7 @@
-[v0.56.21](https://github.com/nextcloud/nextcloudpi/commit/4cc62c8) (2018-06-11) docker: persist SSL certificates
+[v0.56.22](https://github.com/nextcloud/nextcloudpi/commit/cbda56e) (2018-06-14) nc-restore: fix redis restart in docker
+
+[v0.56.21](https://github.com/nextcloud/nextcloudpi/commit/80492b3) (2018-06-11) docker: persist SSL certificates
[v0.56.20](https://github.com/nextcloud/nextcloudpi/commit/ac4128a) (2018-06-11) ncp-web: fix sanitization for fail2ban
diff --git a/etc/ncp-config.d/nc-restore.sh b/etc/ncp-config.d/nc-restore.sh
index aff146f4..d0ec3ddb 100644
--- a/etc/ncp-config.d/nc-restore.sh
+++ b/etc/ncp-config.d/nc-restore.sh
@@ -76,7 +76,7 @@ sed -i "s|'dbpassword' =>.*|'dbpassword' => '$DBPASSWD',|" /var/www/nextcloud/co
REDISPASS="$( grep "^requirepass" /etc/redis/redis.conf | cut -f2 -d' ' )"
[[ "$REDISPASS" != "" ]] && \
sed -i "s|'password'.*|'password' => '$REDISPASS',|" /var/www/nextcloud/config/config.php
-service redis restart
+service redis-server restart
## RE-CREATE DATABASE TABLE
diff --git a/update.sh b/update.sh
index ec465c23..dde94400 100755
--- a/update.sh
+++ b/update.sh
@@ -105,10 +105,6 @@ done
# not for image builds, only live updates
[[ ! -f /.ncp-image ]] && {
- # Update btrfs-sync
- wget -q https://raw.githubusercontent.com/nachoparker/btrfs-sync/master/btrfs-sync -O /usr/local/bin/btrfs-sync
- chmod +x /usr/local/bin/btrfs-sync
-
# docker images only
[[ -f /.docker-image ]] && {
# install curl for dynDNS and duckDNS
@@ -117,42 +113,12 @@ done
apt-get install -y --no-install-recommends curl
}
}
+
# for non docker images
[[ ! -f /.docker-image ]] && {
- # install avahi-daemon in armbian images
- [[ -f /lib/systemd/system/avahi-daemon.service ]] || {
- apt-get update
- apt-get install -y --no-install-recommends avahi-daemon
- }
+ :
}
- # fix wrong user for notifications
- DATADIR="$( grep datadirectory /var/www/nextcloud/config/config.php | awk '{ print $3 }' | grep -oP "[^']*[^']" | head -1 )"
- test -d "$DATADIR" && {
- [[ -d "$DATADIR"/ncp ]] && [[ ! -d "$DATADIR"/admin ]] && {
- F="$CONFDIR"/nc-notify-updates.sh
- grep -q '^USER_=admin$' "$F" && grep -q '^ACTIVE_=yes$' "$F" && {
- sed -i 's|^USER_=admin|USER_=ncp|' "$F"
- cd "$CONFDIR" &>/dev/null
- activate_script nc-notify-updates.sh
- cd - &>/dev/null
- }
- F="$CONFDIR"/nc-autoupdate-ncp.sh
- grep -q '^NOTIFYUSER_=admin$' "$F" && grep -q '^ACTIVE_=yes$' "$F" && {
- sed -i 's|^NOTIFYUSER_=admin|NOTIFYUSER_=ncp|' "$F"
- cd "$CONFDIR" &>/dev/null
- activate_script nc-autoupdate-ncp.sh
- cd - &>/dev/null
- }
- }
- }
-
- # update nc-backup and nc-restore
- cd "$CONFDIR" &>/dev/null
- install_script nc-backup.sh
- install_script nc-restore.sh
- cd - &>/dev/null
-
# fix exit status autoupdate
F="$CONFDIR"/nc-autoupdate-ncp.sh
grep -q '^ACTIVE_=yes$' "$F" && {
@@ -249,6 +215,11 @@ sudo -u www-data php /var/www/nextcloud/occ "$@"
EOF
chmod +x /usr/local/bin/ncc
+ # update nc-restore
+ cd "$CONFDIR" &>/dev/null
+ install_script nc-restore.sh
+ cd - &>/dev/null
+
} # end - only live updates
exit 0