Skip to content

Commit

Permalink
Merge pull request #2002 from nextcloud/fix/ncp-update-nc-as-oneshot
Browse files Browse the repository at this point in the history
ncp-update-nc as oneshot
  • Loading branch information
theCalcaholic authored Nov 8, 2024
2 parents 10a5b4e + 39a05f8 commit 1f7855b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion bin/ncp-update-nc
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@ then
fi

systemctl reset-failed ncp-update-nc 2>/dev/null ||:
systemd-run -u 'ncp-update-nc' bash -c "set -o pipefail; DBG='${DBG:-}' /usr/local/bin/ncp-update-nc.d/update-nc.sh '${VER}' |& tee /var/log/ncp-update-nc.log"
systemd-run -u 'ncp-update-nc' --service-type=oneshot --no-block -p TimeoutStartSec="24h" -p TimeoutStopSec="1h" \
bash -c "set -o pipefail; DBG='${DBG:-}' /usr/local/bin/ncp-update-nc.d/update-nc.sh '${VER}' |& tee /var/log/ncp-update-nc.log"
sleep 1

if ! [[ "$(systemctl is-active ncp-update-nc ||:)" =~ ^(active|inactive|activating|deactivating)$ ]]
Expand Down

0 comments on commit 1f7855b

Please sign in to comment.