Added support to Stretch, Fixed some texts, Removed some lines for testing pruposes

This commit is contained in:
cfcolaco 2017-10-08 12:54:24 +01:00
parent a5258d9f3c
commit 2626127be1

View file

@ -61,14 +61,14 @@ dhcpcdFile=/etc/dhcpcd.conf
# Next see if we are on a tested and supported OS # Next see if we are on a tested and supported OS
function noOS_Support() { function noOS_Support() {
whiptail --msgbox --backtitle "INVALID OS DETECTED" --title "Invalid OS" "We have not been able to detect a supported OS. 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} 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 exit 1
} }
function maybeOS_Support() { 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. 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 Would you like to continue anyway?" ${r} ${c}) then
echo "::: Did not detect perfectly supported OS but," echo "::: Did not detect perfectly supported OS but,"
echo "::: Continuing installation at user's own risk..." echo "::: Continuing installation at user's own risk..."
@ -88,7 +88,7 @@ distro_check() {
case ${PLAT} in case ${PLAT} in
Ubuntu|Raspbian|Debian|Devuan) Ubuntu|Raspbian|Debian|Devuan)
case ${OSCN} in case ${OSCN} in
trusty|xenial|jessie) trusty|xenial|jessie|stretch)
;; ;;
*) *)
maybeOS_Support maybeOS_Support
@ -111,6 +111,9 @@ distro_check() {
if grep -q jessie /etc/os-release; then if grep -q jessie /etc/os-release; then
PLAT="Raspbian" PLAT="Raspbian"
OSCN="jessie" OSCN="jessie"
elif grep -q stretch /etc/os-release; then
PLAT="Raspbian"
OSCN="stretch"
else else
PLAT="Ubuntu" PLAT="Ubuntu"
OSCN="unknown" OSCN="unknown"
@ -435,31 +438,33 @@ update_package_cache() {
timestampAsDate=$(date -d @"${timestamp}" "+%b %e") timestampAsDate=$(date -d @"${timestamp}" "+%b %e")
today=$(date "+%b %e") today=$(date "+%b %e")
<<<<<<< HEAD #### REMOVE IF TESTING WORKS #####
case ${PLAT} in #<<<<<<< HEAD
Ubuntu|Debian|Devuan) # case ${PLAT} in
case ${OSCN} in # Ubuntu|Debian|Devuan)
trusty|jessie|wheezy) # case ${OSCN} in
wget -O - https://swupdate.openvpn.net/repos/repo-public.gpg| $SUDO apt-key add - # trusty|jessie|wheezy)
echo "deb http://swupdate.openvpn.net/apt $OSCN main" | $SUDO tee /etc/apt/sources.list.d/swupdate.openvpn.net.list > /dev/null # wget -O - https://swupdate.openvpn.net/repos/repo-public.gpg| $SUDO apt-key add -
echo -n "::: Adding OpenVPN repo for $PLAT $OSCN ..." # echo "deb http://swupdate.openvpn.net/apt $OSCN main" | $SUDO tee /etc/apt/sources.list.d/swupdate.openvpn.net.list > /dev/null
$SUDO apt-get -qq update & spinner $! # echo -n "::: Adding OpenVPN repo for $PLAT $OSCN ..."
echo " done!" # $SUDO apt-get -qq update & spinner $!
;; # echo " done!"
esac # ;;
;; # esac
esac # ;;
======= # esac
if [[ ${PLAT} == "Ubuntu" || ${PLAT} == "Debian" ]]; then #=======
if [[ ${OSCN} == "trusty" || ${OSCN} == "jessie" || ${OSCN} == "wheezy" ]]; then # if [[ ${PLAT} == "Ubuntu" || ${PLAT} == "Debian" ]]; then
wget -O - https://swupdate.openvpn.net/repos/repo-public.gpg| $SUDO apt-key add - # if [[ ${OSCN} == "trusty" || ${OSCN} == "jessie" || ${OSCN} == "wheezy" ]]; then
echo "deb http://build.openvpn.net/debian/openvpn/stable $OSCN main" | $SUDO tee /etc/apt/sources.list.d/swupdate.openvpn.net.list > /dev/null # wget -O - https://swupdate.openvpn.net/repos/repo-public.gpg| $SUDO apt-key add -
echo -n "::: Adding OpenVPN repo for $PLAT $OSCN ..." # echo "deb http://build.openvpn.net/debian/openvpn/stable $OSCN main" | $SUDO tee /etc/apt/sources.list.d/swupdate.openvpn.net.list > /dev/null
$SUDO apt-get -qq update & spinner $! # echo -n "::: Adding OpenVPN repo for $PLAT $OSCN ..."
echo " done!" # $SUDO apt-get -qq update & spinner $!
fi # echo " done!"
fi # fi
>>>>>>> 454b755116d8cad6b67b56ac15a7235ceac02b5a # fi
#>>>>>>> 454b755116d8cad6b67b56ac15a7235ceac02b5a
##### REMOVE UNTIL THIS POINT######
if [ ! "${today}" == "${timestampAsDate}" ]; then if [ ! "${today}" == "${timestampAsDate}" ]; then
#update package lists #update package lists
@ -543,11 +548,10 @@ checkForDependencies() {
timestampAsDate=$(date -d @"$timestamp" "+%b %e") timestampAsDate=$(date -d @"$timestamp" "+%b %e")
today=$(date "+%b %e") today=$(date "+%b %e")
<<<<<<< HEAD
case ${PLAT} in case ${PLAT} in
Ubuntu|Debian|Devuan) Ubuntu|Debian|Devuan)
case ${OSCN} in case ${OSCN} in
trusty|jessie|wheezy) trusty|jessie|wheezy|stretch)
wget -O - https://swupdate.openvpn.net/repos/repo-public.gpg| $SUDO apt-key add - 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 "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 ..." echo -n "::: Adding OpenVPN repo for $PLAT $OSCN ..."
@ -557,9 +561,8 @@ checkForDependencies() {
esac esac
;; ;;
esac esac
=======
if [[ $PLAT == "Ubuntu" || $PLAT == "Debian" ]]; then 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 - 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 "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 ..." echo -n "::: Adding OpenVPN repo for $PLAT $OSCN ..."
@ -567,7 +570,6 @@ checkForDependencies() {
echo " done!" echo " done!"
fi fi
fi fi
>>>>>>> 454b755116d8cad6b67b56ac15a7235ceac02b5a
if [ ! "$today" == "$timestampAsDate" ]; then if [ ! "$today" == "$timestampAsDate" ]; then
#update package lists #update package lists