mirror of
https://github.com/pivpn/pivpn.git
synced 2024-12-21 04:10:20 +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"
|
||||
|
||||
${SUDO} "${scriptDir}/${vpn}/pivpnDebug.sh" | tee /tmp/debug.log
|
||||
e="${?}"
|
||||
|
||||
echo "::: "
|
||||
echo "::: Debug output completed above."
|
||||
echo "::: Copy saved to /tmp/debug.log"
|
||||
echo "::: "
|
||||
exit "${?}"
|
||||
exit "${e}"
|
||||
}
|
||||
|
||||
removeOVPNFunc() {
|
||||
|
|
|
@ -31,12 +31,13 @@ debug() {
|
|||
echo "::: Generating Debug Output"
|
||||
|
||||
${SUDO} "${scriptdir}/${vpn}/pivpnDEBUG.sh" | tee /tmp/debug.log
|
||||
e="${?}"
|
||||
|
||||
echo "::: "
|
||||
echo "::: Debug output completed above."
|
||||
echo "::: Copy saved to /tmp/debug.log"
|
||||
echo "::: "
|
||||
exit "${?}"
|
||||
exit "${e}"
|
||||
}
|
||||
|
||||
listClients() {
|
||||
|
|
Loading…
Reference in a new issue