Skip to content

Commit

Permalink
update-nc.sh: Run maintenance:repair --include-expensive after update
Browse files Browse the repository at this point in the history
Signed-off-by: Tobias Knöppler <[email protected]>
  • Loading branch information
theCalcaholic committed Aug 18, 2024
1 parent 9f0f6d7 commit 9620fd4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
5 changes: 3 additions & 2 deletions bin/ncp-update-nc
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,11 @@ fi
systemd-run -u 'ncp-update-nc' bash -c "DBG='${DBG:-}' /usr/local/bin/ncp-update-nc.d/update-nc.sh '${VER}' |& tee /var/log/ncp-update-nc.log"
sleep 5

if ! [[ "$(systemctl is-active ncp-update-nc ||:)" =~ ^(active|activating|deactivating)$ ]]
if ! [[ "$(systemctl is-active ncp-update-nc ||:)" =~ ^(active|inactive|activating|deactivating)$ ]]
then
echo "Failed to start ncp-update-nc"
systemctl status --no-pager ncp-update-nc
[[ -f /var/log/ncp-update-nc.log ]] && cat /var/log/ncp-update-nc.log
systemctl status --no-pager ncp-update-nc ||:
fi

connect_to_nc_update
1 change: 1 addition & 0 deletions bin/ncp-update-nc.d/update-nc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@ $ncc | grep -q db:add-missing-indices && $ncc db:add-missing-indices -n
$ncc | grep -q db:add-missing-columns && $ncc db:add-missing-columns -n
$ncc | grep -q db:add-missing-primary-keys && $ncc db:add-missing-primary-keys -n
$ncc | grep -q db:convert-filecache-bigint && $ncc db:convert-filecache-bigint -n
$ncc maintenance:repair --help | grep -q -e '--include-expensive' && $ncc maintenance:repair --include-expensive

# use the correct version for custom apps
NCVER="$(nc_version)"
Expand Down

0 comments on commit 9620fd4

Please sign in to comment.