mirror of
https://github.com/pivpn/pivpn.git
synced 2025-04-24 08:10:10 +00:00
Fix update scripts from test branch
This commit is contained in:
parent
a6087f8bda
commit
41984e5f40
4 changed files with 32 additions and 16 deletions
|
@ -4,8 +4,8 @@ _pivpn()
|
|||
COMPREPLY=()
|
||||
cur="${COMP_WORDS[COMP_CWORD]}"
|
||||
prev="${COMP_WORDS[COMP_CWORD-1]}"
|
||||
dashopts="-a -c -d -l -qr -r -h -u"
|
||||
opts="add clients debug list qrcode remove help uninstall"
|
||||
dashopts="-a -c -d -l -qr -r -h -u -up"
|
||||
opts="add clients debug list qrcode remove help uninstall update"
|
||||
if [ "${#COMP_WORDS[@]}" -eq 2 ]
|
||||
then
|
||||
if [[ ${cur} == -* ]] ; then
|
||||
|
|
|
@ -48,6 +48,12 @@ uninstallServer(){
|
|||
exit 0
|
||||
}
|
||||
|
||||
updateScripts(){
|
||||
shift
|
||||
$SUDO /opt/pivpn/update.sh "$@"
|
||||
exit 0
|
||||
}
|
||||
|
||||
showHelp(){
|
||||
echo "::: Control all PiVPN specific functions!"
|
||||
echo ":::"
|
||||
|
@ -62,6 +68,7 @@ showHelp(){
|
|||
echo "::: -r, remove Remove a client"
|
||||
echo "::: -h, help Show this help dialog"
|
||||
echo "::: -u, uninstall Uninstall pivpn from your system!"
|
||||
echo "::: -up, update Updates PiVPN Scripts"
|
||||
exit 0
|
||||
}
|
||||
|
||||
|
@ -79,5 +86,6 @@ case "$1" in
|
|||
"-r" | "remove" ) removeClient "$@";;
|
||||
"-h" | "help" ) showHelp;;
|
||||
"-u" | "uninstall" ) uninstallServer;;
|
||||
"-up" | "update" ) updateScripts "$@" ;;
|
||||
* ) showHelp;;
|
||||
esac
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue