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"
|
export SUDO="sudo"
|
||||||
else
|
else
|
||||||
echo "::: Please install sudo or run this as root."
|
echo "::: Please install sudo or run this as root."
|
||||||
exit 0
|
exit 1
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
|
@ -13,39 +13,39 @@ fi
|
||||||
makeConf(){
|
makeConf(){
|
||||||
shift
|
shift
|
||||||
$SUDO /opt/pivpn/makeCONF.sh "$@"
|
$SUDO /opt/pivpn/makeCONF.sh "$@"
|
||||||
exit 1
|
exit 0
|
||||||
}
|
}
|
||||||
|
|
||||||
listConnected(){
|
listConnected(){
|
||||||
$SUDO wg show
|
$SUDO wg show
|
||||||
exit 1
|
exit 0
|
||||||
}
|
}
|
||||||
|
|
||||||
debug(){
|
debug(){
|
||||||
$SUDO /opt/pivpn/pivpnDEBUG.sh
|
$SUDO /opt/pivpn/pivpnDEBUG.sh
|
||||||
exit 1
|
exit 0
|
||||||
}
|
}
|
||||||
|
|
||||||
listClients(){
|
listClients(){
|
||||||
$SUDO /opt/pivpn/listCONF.sh
|
$SUDO /opt/pivpn/listCONF.sh
|
||||||
exit 1
|
exit 0
|
||||||
}
|
}
|
||||||
|
|
||||||
showQrcode(){
|
showQrcode(){
|
||||||
shift
|
shift
|
||||||
$SUDO /opt/pivpn/qrcodeCONF.sh "$@"
|
$SUDO /opt/pivpn/qrcodeCONF.sh "$@"
|
||||||
exit 1
|
exit 0
|
||||||
}
|
}
|
||||||
|
|
||||||
removeClient(){
|
removeClient(){
|
||||||
shift
|
shift
|
||||||
$SUDO /opt/pivpn/removeCONF.sh "$@"
|
$SUDO /opt/pivpn/removeCONF.sh "$@"
|
||||||
exit 1
|
exit 0
|
||||||
}
|
}
|
||||||
|
|
||||||
uninstallServer(){
|
uninstallServer(){
|
||||||
$SUDO /opt/pivpn/uninstall.sh
|
$SUDO /opt/pivpn/uninstall.sh
|
||||||
exit 1
|
exit 0
|
||||||
}
|
}
|
||||||
|
|
||||||
showHelp(){
|
showHelp(){
|
||||||
|
@ -62,7 +62,7 @@ showHelp(){
|
||||||
echo "::: -r, remove Remove a client"
|
echo "::: -r, remove Remove a client"
|
||||||
echo "::: -h, help Show this help dialog"
|
echo "::: -h, help Show this help dialog"
|
||||||
echo "::: -u, uninstall Uninstall pivpn from your system!"
|
echo "::: -u, uninstall Uninstall pivpn from your system!"
|
||||||
exit 1
|
exit 0
|
||||||
}
|
}
|
||||||
|
|
||||||
if [ $# = 0 ]; then
|
if [ $# = 0 ]; then
|
||||||
|
|
Loading…
Reference in a new issue