From 2626127be18fca41802fa009453877cb6d0544e6 Mon Sep 17 00:00:00 2001 From: cfcolaco Date: Sun, 8 Oct 2017 12:54:24 +0100 Subject: [PATCH] Added support to Stretch, Fixed some texts, Removed some lines for testing pruposes --- auto_install/install.sh | 68 +++++++++++++++++++++-------------------- 1 file changed, 35 insertions(+), 33 deletions(-) diff --git a/auto_install/install.sh b/auto_install/install.sh index 9c580a0..fcfde96 100755 --- a/auto_install/install.sh +++ b/auto_install/install.sh @@ -61,14 +61,14 @@ dhcpcdFile=/etc/dhcpcd.conf # Next see if we are on a tested and supported OS function noOS_Support() { whiptail --msgbox --backtitle "INVALID OS DETECTED" --title "Invalid OS" "We have not been able to detect a supported OS. -Currently this installer supports Raspbian (or Devuan) jessie, Ubuntu 14.04 (trusty), and Ubuntu 16.04 (xenial). +Currently this installer supports Raspbian, Debian or Devuan jessie and stretch and Ubuntu from 14.04 (trusty) to 17.04 (zetsy). If you think you received this message in error, you can post an issue on the GitHub at https://github.com/pivpn/pivpn/issues." ${r} ${c} exit 1 } function maybeOS_Support() { if (whiptail --backtitle "Not Supported OS" --title "Not Supported OS" --yesno "You are on an OS that we have not tested but MAY work. -Currently this installer supports Raspbian (or Devuan) jessie, Ubuntu 14.04 (trusty), and Ubuntu 16.04 (xenial). +Currently this installer ssupports Raspbian, Debian or Devuan jessie and stretch and Ubuntu from 14.04 (trusty) to 17.04 (zetsy). Would you like to continue anyway?" ${r} ${c}) then echo "::: Did not detect perfectly supported OS but," echo "::: Continuing installation at user's own risk..." @@ -88,7 +88,7 @@ distro_check() { case ${PLAT} in Ubuntu|Raspbian|Debian|Devuan) case ${OSCN} in - trusty|xenial|jessie) + trusty|xenial|jessie|stretch) ;; *) maybeOS_Support @@ -111,6 +111,9 @@ distro_check() { if grep -q jessie /etc/os-release; then PLAT="Raspbian" OSCN="jessie" + elif grep -q stretch /etc/os-release; then + PLAT="Raspbian" + OSCN="stretch" else PLAT="Ubuntu" OSCN="unknown" @@ -435,31 +438,33 @@ update_package_cache() { timestampAsDate=$(date -d @"${timestamp}" "+%b %e") today=$(date "+%b %e") -<<<<<<< HEAD - case ${PLAT} in - Ubuntu|Debian|Devuan) - case ${OSCN} in - trusty|jessie|wheezy) - 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!" - ;; - esac - ;; - esac -======= - 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://build.openvpn.net/debian/openvpn/stable $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 ->>>>>>> 454b755116d8cad6b67b56ac15a7235ceac02b5a +#### REMOVE IF TESTING WORKS ##### +#<<<<<<< HEAD +# case ${PLAT} in +# Ubuntu|Debian|Devuan) +# case ${OSCN} in +# trusty|jessie|wheezy) +# 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!" +# ;; +# esac +# ;; +# esac +#======= +# 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://build.openvpn.net/debian/openvpn/stable $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 +#>>>>>>> 454b755116d8cad6b67b56ac15a7235ceac02b5a +##### REMOVE UNTIL THIS POINT###### if [ ! "${today}" == "${timestampAsDate}" ]; then #update package lists @@ -543,11 +548,10 @@ checkForDependencies() { timestampAsDate=$(date -d @"$timestamp" "+%b %e") today=$(date "+%b %e") -<<<<<<< HEAD case ${PLAT} in Ubuntu|Debian|Devuan) case ${OSCN} in - trusty|jessie|wheezy) + trusty|jessie|wheezy|stretch) 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 ..." @@ -557,9 +561,8 @@ checkForDependencies() { esac ;; esac -======= if [[ $PLAT == "Ubuntu" || $PLAT == "Debian" ]]; then - if [[ $OSCN == "trusty" || $OSCN == "jessie" || $OSCN == "wheezy" ]]; then + if [[ $OSCN == "trusty" || $OSCN == "jessie" || $OSCN == "wheezy" || $OSCN == "stretch" ]]; then wget -O - https://swupdate.openvpn.net/repos/repo-public.gpg| $SUDO apt-key add - echo "deb http://build.openvpn.net/debian/openvpn/stable $OSCN main" | $SUDO tee /etc/apt/sources.list.d/swupdate.openvpn.net.list > /dev/null echo -n "::: Adding OpenVPN repo for $PLAT $OSCN ..." @@ -567,7 +570,6 @@ checkForDependencies() { echo " done!" fi fi ->>>>>>> 454b755116d8cad6b67b56ac15a7235ceac02b5a if [ ! "$today" == "$timestampAsDate" ]; then #update package lists