mirror of
https://github.com/pivpn/pivpn.git
synced 2025-04-22 23:30:11 +00:00
initial dual install try
This commit is contained in:
parent
e66e2c6513
commit
f379ca2e10
9 changed files with 95 additions and 79 deletions
|
@ -1,7 +1,7 @@
|
|||
#!/bin/bash
|
||||
# Create OVPN Client
|
||||
# Default Variable Declarations
|
||||
setupVars="/etc/pivpn/setupVars.conf"
|
||||
setupVars="/etc/pivpn/openvpn/setupVars.conf"
|
||||
DEFAULT="Default.txt"
|
||||
FILEEXT=".ovpn"
|
||||
CRT=".crt"
|
||||
|
|
|
@ -10,26 +10,29 @@ if [[ ! $EUID -eq 0 ]];then
|
|||
fi
|
||||
fi
|
||||
|
||||
scriptdir="/opt/pivpn"
|
||||
vpn="openvpn"
|
||||
|
||||
function makeOVPNFunc {
|
||||
shift
|
||||
$SUDO /opt/pivpn/makeOVPN.sh "$@"
|
||||
$SUDO ${scripdir}/${vpn}/makeOVPN.sh "$@"
|
||||
exit 0
|
||||
}
|
||||
|
||||
function listClientsFunc {
|
||||
shift
|
||||
$SUDO /opt/pivpn/clientStat.sh "$@"
|
||||
$SUDO ${scripdir}/${vpn}/clientStat.sh "$@"
|
||||
exit 0
|
||||
}
|
||||
|
||||
function listOVPNFunc {
|
||||
$SUDO /opt/pivpn/listOVPN.sh
|
||||
$SUDO ${scripdir}/${vpn}/listOVPN.sh
|
||||
exit 0
|
||||
}
|
||||
|
||||
function debugFunc {
|
||||
echo "::: Generating Debug Output"
|
||||
$SUDO /opt/pivpn/pivpnDebug.sh | tee /tmp/debug.txt
|
||||
$SUDO ${scripdir}/${vpn}/pivpnDebug.sh | tee /tmp/debug.txt
|
||||
echo "::: "
|
||||
echo "::: Debug output completed above."
|
||||
echo "::: Copy saved to /tmp/debug.txt"
|
||||
|
@ -39,12 +42,12 @@ function debugFunc {
|
|||
|
||||
function removeOVPNFunc {
|
||||
shift
|
||||
$SUDO /opt/pivpn/removeOVPN.sh "$@"
|
||||
$SUDO ${scripdir}/${vpn}/removeOVPN.sh "$@"
|
||||
exit 0
|
||||
}
|
||||
|
||||
function uninstallFunc {
|
||||
$SUDO /opt/pivpn/uninstall.sh
|
||||
$SUDO ${scripdir}/uninstall.sh
|
||||
exit 0
|
||||
}
|
||||
|
||||
|
@ -55,7 +58,7 @@ function versionFunc {
|
|||
function update {
|
||||
|
||||
shift
|
||||
$SUDO /opt/pivpn/update.sh "$@"
|
||||
$SUDO ${scripdir}/update.sh "$@"
|
||||
exit 0
|
||||
|
||||
|
||||
|
@ -63,7 +66,7 @@ function update {
|
|||
|
||||
function backup {
|
||||
|
||||
$SUDO /opt/pivpn/backup.sh
|
||||
$SUDO ${scripdir}/backup.sh
|
||||
exit 0
|
||||
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#!/usr/bin/env bash
|
||||
# This scripts runs as root
|
||||
|
||||
setupVars="/etc/pivpn/setupVars.conf"
|
||||
setupVars="/etc/pivpn/openvpn/setupVars.conf"
|
||||
|
||||
if [ ! -f "${setupVars}" ]; then
|
||||
echo "::: Missing setup vars file!"
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#!/usr/bin/env bash
|
||||
# PiVPN: revoke client script
|
||||
|
||||
setupVars="/etc/pivpn/setupVars.conf"
|
||||
setupVars="/etc/pivpn/openvpn/setupVars.conf"
|
||||
INDEX="/etc/openvpn/easy-rsa/pki/index.txt"
|
||||
|
||||
if [ ! -f "${setupVars}" ]; then
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#!/bin/bash
|
||||
|
||||
setupVars="/etc/pivpn/setupVars.conf"
|
||||
setupVars="/etc/pivpn/wireguard/setupVars.conf"
|
||||
|
||||
if [ ! -f "${setupVars}" ]; then
|
||||
echo "::: Missing setup vars file!"
|
||||
|
|
|
@ -10,53 +10,56 @@ if [ $EUID -ne 0 ];then
|
|||
fi
|
||||
fi
|
||||
|
||||
scriptdir="/opt/pivpn"
|
||||
vpn="wireguard"
|
||||
|
||||
makeConf(){
|
||||
shift
|
||||
$SUDO /opt/pivpn/makeCONF.sh "$@"
|
||||
$SUDO ${scriptdir}/${vpn}/makeCONF.sh "$@"
|
||||
exit 0
|
||||
}
|
||||
|
||||
listConnected(){
|
||||
shift
|
||||
$SUDO /opt/pivpn/clientSTAT.sh "$@"
|
||||
$SUDO ${scriptdir}/${vpn}/clientSTAT.sh "$@"
|
||||
exit 0
|
||||
}
|
||||
|
||||
debug(){
|
||||
$SUDO /opt/pivpn/pivpnDEBUG.sh
|
||||
$SUDO ${scriptdir}/${vpn}/pivpnDEBUG.sh
|
||||
exit 0
|
||||
}
|
||||
|
||||
listClients(){
|
||||
$SUDO /opt/pivpn/listCONF.sh
|
||||
$SUDO ${scriptdir}/${vpn}/listCONF.sh
|
||||
exit 0
|
||||
}
|
||||
|
||||
showQrcode(){
|
||||
shift
|
||||
$SUDO /opt/pivpn/qrcodeCONF.sh "$@"
|
||||
$SUDO ${scriptdir}/${vpn}/qrcodeCONF.sh "$@"
|
||||
exit 0
|
||||
}
|
||||
|
||||
removeClient(){
|
||||
shift
|
||||
$SUDO /opt/pivpn/removeCONF.sh "$@"
|
||||
$SUDO ${scriptdir}/${vpn}/removeCONF.sh "$@"
|
||||
exit 0
|
||||
}
|
||||
|
||||
uninstallServer(){
|
||||
$SUDO /opt/pivpn/uninstall.sh
|
||||
$SUDO ${scriptdir}/uninstall.sh
|
||||
exit 0
|
||||
}
|
||||
|
||||
updateScripts(){
|
||||
shift
|
||||
$SUDO /opt/pivpn/update.sh "$@"
|
||||
$SUDO ${scriptdir}/update.sh "$@"
|
||||
exit 0
|
||||
}
|
||||
|
||||
backup(){
|
||||
$SUDO /opt/pivpn/backup.sh
|
||||
$SUDO ${scriptdir}/backup.sh
|
||||
}
|
||||
|
||||
showHelp(){
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#!/usr/bin/env bash
|
||||
# This scripts runs as root
|
||||
|
||||
setupVars="/etc/pivpn/setupVars.conf"
|
||||
setupVars="/etc/pivpn/wireguard/setupVars.conf"
|
||||
|
||||
if [ ! -f "${setupVars}" ]; then
|
||||
echo "::: Missing setup vars file!"
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#!/bin/bash
|
||||
|
||||
setupVars="/etc/pivpn/setupVars.conf"
|
||||
setupVars="/etc/pivpn/wireguard/setupVars.conf"
|
||||
|
||||
if [ ! -f "${setupVars}" ]; then
|
||||
echo "::: Missing setup vars file!"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue