mirror of
https://github.com/YunoHost/install_script.git
synced 2024-09-03 20:06:25 +02:00
adding specific exit code variable for each error type
This commit is contained in:
parent
3089dc1016
commit
307fa4b0a8
1 changed files with 6 additions and 1 deletions
|
@ -5,6 +5,7 @@ ERR_FAIL_RESTORE=1
|
|||
ERR_FAIL_UPDATE=2
|
||||
ERR_FAIL_INSTALL=3
|
||||
ERR_CANCEL_INSTALL=4
|
||||
ERR_IMPOSSIBLE=-1
|
||||
|
||||
function bck {
|
||||
FULLPATH="$(readlink -f "$1")"
|
||||
|
@ -158,9 +159,13 @@ then
|
|||
service nscd restart
|
||||
service nslcd restart
|
||||
echo "======== Installation success ========"
|
||||
exit $SUCCESS
|
||||
fi
|
||||
|
||||
else
|
||||
echo "======== Installation cancelled ========"
|
||||
exit 1
|
||||
exit $ERR_CANCEL_INSTALL
|
||||
fi
|
||||
|
||||
# Security : we shouldn't be able to exit here
|
||||
exit $ERR_IMPOSSIBLE
|
||||
|
|
Loading…
Add table
Reference in a new issue