forked from allyourbankarebelongtous/pleb-vpn
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpleb-vpnMenu.sh
More file actions
54 lines (48 loc) · 1.43 KB
/
pleb-vpnMenu.sh
File metadata and controls
54 lines (48 loc) · 1.43 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#!/bin/bash
# pleb-VPN main menu
plebVPNConf="/home/admin/pleb-vpn/pleb-vpn.conf"
source ${plebVPNConf}
source /mnt/hdd/raspiblitz.conf
# BASIC MENU INFO
WIDTH=66
BACKTITLE="Pleb-VPN"
TITLE="Manage Pleb-VPN functions and services"
MENU="Choose one of the following options:"
OPTIONS=()
OPTIONS+=(STATUS "Get the current status of installed services")
OPTIONS+=(SERVICES "Install and configure VPNs and hybrid mode")
OPTIONS+=(PAYMENTS "Manage, add, or remove recurring payments")
# if WireGuard is on in pleb-vpn.conf
if [ "${wireguard}" = "on" ]; then
OPTIONS+=(WIREGUARD-CONNECT "Get WireGuard config files for clients")
fi
OPTIONS+=(PLEB-VPN "Uninstall or update Pleb-VPN")
# display menu
CHOICE_HEIGHT=$(("${#OPTIONS[@]}/2+1"))
HEIGHT=$((CHOICE_HEIGHT+6))
CHOICE=$(dialog --clear \
--backtitle "$BACKTITLE" \
--title "$TITLE" \
--ok-label "Select" \
--cancel-label "Main menu" \
--menu "$MENU" \
$HEIGHT $WIDTH $CHOICE_HEIGHT \
"${OPTIONS[@]}" \
2>&1 >/dev/tty)
case $CHOICE in
STATUS)
/home/admin/pleb-vpn/pleb-vpnStatusMenu.sh
;;
SERVICES)
/home/admin/pleb-vpn/pleb-vpnServicesMenu.sh
;;
PAYMENTS)
/home/admin/pleb-vpn/pleb-vpnPaymentMenu.sh
;;
WIREGUARD-CONNECT)
/home/admin/pleb-vpn/wg-install.sh connect
;;
PLEB-VPN)
/home/admin/pleb-vpn/pleb-vpnUpdateMenu.sh
;;
esac