mirror of
https://github.com/pivpn/pivpn.git
synced 2024-12-18 19:00:15 +00:00
Fix exit codes
This commit is contained in:
parent
1ff6f7e9e8
commit
b9c6c0f314
2 changed files with 9 additions and 9 deletions
|
@ -6,7 +6,7 @@ if [[ ! $EUID -eq 0 ]];then
|
|||
export SUDO="sudo"
|
||||
else
|
||||
echo "::: Please install sudo or run this as root."
|
||||
exit 0
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
|
|
|
@ -13,39 +13,39 @@ fi
|
|||
makeConf(){
|
||||
shift
|
||||
$SUDO /opt/pivpn/makeCONF.sh "$@"
|
||||
exit 1
|
||||
exit 0
|
||||
}
|
||||
|
||||
listConnected(){
|
||||
$SUDO wg show
|
||||
exit 1
|
||||
exit 0
|
||||
}
|
||||
|
||||
debug(){
|
||||
$SUDO /opt/pivpn/pivpnDEBUG.sh
|
||||
exit 1
|
||||
exit 0
|
||||
}
|
||||
|
||||
listClients(){
|
||||
$SUDO /opt/pivpn/listCONF.sh
|
||||
exit 1
|
||||
exit 0
|
||||
}
|
||||
|
||||
showQrcode(){
|
||||
shift
|
||||
$SUDO /opt/pivpn/qrcodeCONF.sh "$@"
|
||||
exit 1
|
||||
exit 0
|
||||
}
|
||||
|
||||
removeClient(){
|
||||
shift
|
||||
$SUDO /opt/pivpn/removeCONF.sh "$@"
|
||||
exit 1
|
||||
exit 0
|
||||
}
|
||||
|
||||
uninstallServer(){
|
||||
$SUDO /opt/pivpn/uninstall.sh
|
||||
exit 1
|
||||
exit 0
|
||||
}
|
||||
|
||||
showHelp(){
|
||||
|
@ -62,7 +62,7 @@ showHelp(){
|
|||
echo "::: -r, remove Remove a client"
|
||||
echo "::: -h, help Show this help dialog"
|
||||
echo "::: -u, uninstall Uninstall pivpn from your system!"
|
||||
exit 1
|
||||
exit 0
|
||||
}
|
||||
|
||||
if [ $# = 0 ]; then
|
||||
|
|
Loading…
Reference in a new issue