diff --git a/README.md b/README.md index 9d200f9..355f901 100644 --- a/README.md +++ b/README.md @@ -133,6 +133,8 @@ welcome any feedback on your experience. If you have problems using it, feel free to post an issue here on github. I'll classify the issues the best I can to keep things sorted. +You can also post on the [Google Space](https://goo.gl/spaces/kgp2Mcy5RDfZ5SSf8) I created for PiVPN, especially suited for general questions or discussions. + Contributions ------------- diff --git a/auto_install/install.sh b/auto_install/install.sh index f046bd8..7b632ff 100644 --- a/auto_install/install.sh +++ b/auto_install/install.sh @@ -76,6 +76,7 @@ function maybeOS_Support() { fi } +# if lsb_release command is on their system if hash lsb_release 2>/dev/null; then PLAT=$(lsb_release -si) OSCN=$(lsb_release -sc) # We want this to be trusty xenial or jessie @@ -87,13 +88,17 @@ if hash lsb_release 2>/dev/null; then else noOS_Support fi +# else get info from os-release elif [[ "$(cat /etc/os-release | grep raspbian)" ]]; then if [[ "$(cat /etc/os-release | grep jessie)" ]]; then PLAT="Raspbian" OSCN="jessie" else + PLAT="Ubuntu" + OSCN="unknown" maybeOS_Support fi +# else we prob don't want to install else noOS_Support fi @@ -368,15 +373,19 @@ checkForDependencies() { timestampAsDate=$(date -d @"$timestamp" "+%b %e") today=$(date "+%b %e") - if [[ $PLAT == "Ubuntu" ]]; then - wget -O - https://swupdate.openvpn.net/repos/repo-public.gpg| $SUDO apt-key add - - echo "deb http://swupdate.openvpn.net/apt trusty main" | $SUDO tee /etc/apt/sources.list.d/swupdate.openvpn.net.list > /dev/null + if [[ $PLAT == "Ubuntu" || $PLAT == "Debian" ]]; then + if [[ $OSCN == "trusty" || $OSCN == "jessie" || $OSCN == "wheezy" ]]; then + wget -O - https://swupdate.openvpn.net/repos/repo-public.gpg| $SUDO apt-key add - + echo "deb http://swupdate.openvpn.net/apt $OSCN main" | $SUDO tee /etc/apt/sources.list.d/swupdate.openvpn.net.list > /dev/null + echo -n "::: Adding openvpn repo for $PLAT $OSCN ..." + $SUDO apt-get -qq update & spinner $! + echo " done!" + fi fi - if [ ! "$today" == "$timestampAsDate" ] || [ $PLAT = "Ubuntu" ]; then + if [ ! "$today" == "$timestampAsDate" ]; then #update package lists echo ":::" - echo "::: Either you are on ubuntu or" echo -n "::: apt-get update has not been run today. Running now..." $SUDO apt-get -qq update & spinner $! echo " done!" @@ -896,7 +905,8 @@ verifyFreeDiskSpace # Find interfaces and let the user choose one chooseInterface -if [[ $PLAT == "Ubuntu" ]]; then +# Only try to set static on Raspbian, otherwise let user do it +if [[ $PLAT != "Raspbian" ]]; then avoidStaticIPv4Ubuntu else getStaticIPv4Settings diff --git a/scripts/uninstall.sh b/scripts/uninstall.sh index 4b50e62..902faf9 100644 --- a/scripts/uninstall.sh +++ b/scripts/uninstall.sh @@ -83,7 +83,7 @@ echo ":::" $SUDO rm -rf /var/log/*openvpn* &> /dev/null if [[ $UINST_OVPN = 1 ]]; then $SUDO rm -rf /etc/openvpn &> /dev/null - if [[ $PLAT = "Ubuntu" ]]; then + if [[ $PLAT == "Ubuntu" || $PLAT == "Debian" ]]; then printf "::: Removing openvpn apt source..." $SUDO rm -rf /etc/apt/sources.list.d/swupdate.openvpn.net.list &> /dev/null $SUDO apt-get -qq update & spinner $!; printf "done!\n";