From 17d1b6980552ac95d21db15ba5a3abe085eba963 Mon Sep 17 00:00:00 2001 From: Bill Zimmerman Date: Wed, 31 Aug 2016 16:30:28 +0200 Subject: [PATCH] Detect Raspian version and set lighttpd webroot. Fixes #29 --- installers/common.sh | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/installers/common.sh b/installers/common.sh index dbf1695e..127fa6c1 100644 --- a/installers/common.sh +++ b/installers/common.sh @@ -1,6 +1,15 @@ raspap_dir="/etc/raspap" raspap_user="www-data" -webroot_dir="/var/www" +version=`cat /etc/debian_version` + +# Determine version and set default home location for lighttpd +if [ $version == "8.0" ]; then + echo -n "Raspian verison is 8.0 Jessie" + webroot_dir="/var/www/html" +elif [ $version == "7.8" ]; then + echo -n "Raspian version is 7.8 Wheezy" + webroot_dir="/var/www" +fi # Outputs a RaspAP INSTALL log line function install_log() {