mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-11-19 22:46:20 -05:00
Upgrade script trap preserves exit code so that it does not report upgrade is complete when it actually fails.
This commit is contained in:
parent
bdee41fd19
commit
f61eee1289
1 changed files with 7 additions and 2 deletions
|
|
@ -4,8 +4,13 @@
|
|||
set -e
|
||||
set -x
|
||||
|
||||
# Ensure help service is always restarted, even on failure
|
||||
trap 'systemctl restart wrolpi-help.service || :' EXIT
|
||||
# Ensure help service is always restarted, but preserve exit code
|
||||
cleanup() {
|
||||
local exit_code=$?
|
||||
systemctl restart wrolpi-help.service || :
|
||||
exit $exit_code
|
||||
}
|
||||
trap cleanup EXIT
|
||||
|
||||
# Install any App dependencies.
|
||||
cd /opt/wrolpi/app || exit 1
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue