Skip to content

Commit

Permalink
include maintenance repair command
Browse files Browse the repository at this point in the history
  • Loading branch information
kiekerjan committed Sep 15, 2024
1 parent 1cd545b commit b47923c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion setup/nextcloud.sh
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,8 @@ if [ $E -ne 0 ] && [ $E -ne 3 ]; then exit 1; fi

# Disable default apps that we don't support
sudo -u www-data \
php"$PHP_VER" $CLOUD_DIR/occ app:disable photos dashboard activity weather_status \
php"$PHP_VER" $CLOUD_DIR/occ app:disable photos dashboard activity \
weather_status logreader \
| (grep -v "No such app enabled" || /bin/true)

# Install interesting apps
Expand Down Expand Up @@ -518,6 +519,9 @@ chmod +x /etc/cron.d/mailinabox-nextcloud
# Or else the reminders will just be sent as soon as possible when the background jobs run.
hide_output sudo -u www-data php"$PHP_VER" -f $CLOUD_DIR/occ config:app:set dav sendEventRemindersMode --value occ

# Run the maintenance command
hide_output sudo -u www-data php"$PHP_VER" $CLOUD_DIR/occ maintenance:repair --include-expensive

# Now set the config to read-only.
# Do this only at the very bottom when no further occ commands are needed.
sed -i'' "s/'config_is_read_only'\s*=>\s*false/'config_is_read_only' => true/" "$STORAGE_ROOT/owncloud/config.php"
Expand Down

0 comments on commit b47923c

Please sign in to comment.