mirror of
https://github.com/pivpn/pivpn.git
synced 2024-12-19 03:10:16 +00:00
refactor(scripts): preserve exit codes (SC2320)
SC2320: Set error code to variable to preserve it after other commands.
This commit is contained in:
parent
c9e2537c19
commit
50bc333962
2 changed files with 4 additions and 2 deletions
|
@ -36,12 +36,13 @@ debugFunc() {
|
||||||
echo "::: Generating Debug Output"
|
echo "::: Generating Debug Output"
|
||||||
|
|
||||||
${SUDO} "${scriptDir}/${vpn}/pivpnDebug.sh" | tee /tmp/debug.log
|
${SUDO} "${scriptDir}/${vpn}/pivpnDebug.sh" | tee /tmp/debug.log
|
||||||
|
e="${?}"
|
||||||
|
|
||||||
echo "::: "
|
echo "::: "
|
||||||
echo "::: Debug output completed above."
|
echo "::: Debug output completed above."
|
||||||
echo "::: Copy saved to /tmp/debug.log"
|
echo "::: Copy saved to /tmp/debug.log"
|
||||||
echo "::: "
|
echo "::: "
|
||||||
exit "${?}"
|
exit "${e}"
|
||||||
}
|
}
|
||||||
|
|
||||||
removeOVPNFunc() {
|
removeOVPNFunc() {
|
||||||
|
|
|
@ -31,12 +31,13 @@ debug() {
|
||||||
echo "::: Generating Debug Output"
|
echo "::: Generating Debug Output"
|
||||||
|
|
||||||
${SUDO} "${scriptdir}/${vpn}/pivpnDEBUG.sh" | tee /tmp/debug.log
|
${SUDO} "${scriptdir}/${vpn}/pivpnDEBUG.sh" | tee /tmp/debug.log
|
||||||
|
e="${?}"
|
||||||
|
|
||||||
echo "::: "
|
echo "::: "
|
||||||
echo "::: Debug output completed above."
|
echo "::: Debug output completed above."
|
||||||
echo "::: Copy saved to /tmp/debug.log"
|
echo "::: Copy saved to /tmp/debug.log"
|
||||||
echo "::: "
|
echo "::: "
|
||||||
exit "${?}"
|
exit "${e}"
|
||||||
}
|
}
|
||||||
|
|
||||||
listClients() {
|
listClients() {
|
||||||
|
|
Loading…
Reference in a new issue