Skip to content

Commit 00e2286

Browse files
authored
tested and works
Signed-off-by: Daniel Hansson <[email protected]>
1 parent 40c7165 commit 00e2286

File tree

1 file changed

+10
-12
lines changed

1 file changed

+10
-12
lines changed

nextcloud_update.sh

+10-12
Original file line numberDiff line numberDiff line change
@@ -725,6 +725,10 @@ fi
725725
print_text_in_color "$IGreen" "Disabling maintenance:mode..."
726726
sudo -u www-data php "$NCPATH"/occ maintenance:mode --off
727727

728+
# Make all previous files executable
729+
print_text_in_color "$ICyan" "Finding all executable files in $NC_APPS_PATH"
730+
find_executables="$(find $NC_APPS_PATH -type f -executable)"
731+
728732
# Update all Nextcloud apps
729733
if [ "${CURRENTVERSION%%.*}" -ge "15" ]
730734
then
@@ -770,11 +774,6 @@ then
770774
systemctl restart notify_push.service
771775
fi
772776

773-
# Make all previous files executable
774-
print_text_in_color "$ICyan" "Finding all executable files in $NC_APPS_PATH"
775-
find_executables="(find $NC_APPS_PATH -type f -executable)"
776-
export "{$find_executables}"
777-
778777
if [ -f /tmp/minor.version ]
779778
then
780779
NCBAD=$(cat /tmp/minor.version)
@@ -1179,13 +1178,6 @@ then
11791178
fi
11801179
fi
11811180

1182-
# Make all files in executable again
1183-
for executable in $find_executables
1184-
do
1185-
chmod +x "$executable"
1186-
unset "$find_executables"
1187-
done
1188-
11891181
# Start Apache2
11901182
start_if_stopped apache2
11911183

@@ -1260,6 +1252,12 @@ then
12601252
mkdir -p "$VMLOGS"
12611253
fi
12621254

1255+
# Make all files in executable again
1256+
for executable in $find_executables
1257+
do
1258+
chmod +x "$executable"
1259+
done
1260+
12631261
CURRENTVERSION_after=$(nextcloud_occ status | grep "versionstring" | awk '{print $3}')
12641262
if [[ "$NCVERSION" == "$CURRENTVERSION_after" ]] || [ -n "$PRERELEASE_VERSION" ]
12651263
then

0 commit comments

Comments
 (0)