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-05-15 07:46:50 +0300
committernachoparker <nacho@ownyourbits.com>2018-05-15 07:46:50 +0300
commitee92111007a81d6443b3ad3d9471deec9cb71742 (patch)
tree47f7c0d361b2bc6f4acf16632ce48a7ceadd3bc2 /update.sh
parent191ea16ec9bf403e516eb67c5fccebf86e9ace65 (diff)
nc-autoupdate-ncp: fix wrong userv0.55.4
Diffstat (limited to 'update.sh')
-rwxr-xr-xupdate.sh22
1 files changed, 15 insertions, 7 deletions
diff --git a/update.sh b/update.sh
index d289179b..0f05d092 100755
--- a/update.sh
+++ b/update.sh
@@ -120,14 +120,22 @@ done
# fix wrong user for notifications
DATADIR="$( grep datadirectory /var/www/nextcloud/config/config.php | awk '{ print $3 }' | grep -oP "[^']*[^']" | head -1 )"
- F="$CONFDIR"/nc-notify-updates.sh
test -d "$DATADIR" && {
- [[ -d "$DATADIR"/ncp ]] && [[ ! -d "$DATADIR"/admin ]] \
- && 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
+ [[ -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
+ }
}
}