update-nc.sh: Run maintenance:repair --include-expensive after update

Signed-off-by: Tobias Knöppler <6317548+theCalcaholic@users.noreply.github.com>
This commit is contained in:
Tobias Knöppler 2024-08-19 00:22:31 +02:00
parent 335df8bd03
commit 4d9102a967
No known key found for this signature in database
GPG Key ID: 3510056072886A8F
2 changed files with 4 additions and 2 deletions

View File

@ -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

View File

@ -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)"