From 5c820dd7b8a9187072073d778bbaf20d72269ff0 Mon Sep 17 00:00:00 2001 From: Jason Date: Fri, 27 Jul 2018 12:57:39 -0700 Subject: [PATCH] Added code to snipeit.sh for Raspbian 9.4 install (#5980) * Added code to snipeit.sh for Raspbian 9.4 install * More additions to snipeit.sh to install php7.2 on raspian in prep for version 5 * added public/phpinfo.php to .gitignore * Deleted phpinfo.php * removed phpinfo.php from .gitignore --- snipeit.sh | 71 ++++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 69 insertions(+), 2 deletions(-) diff --git a/snipeit.sh b/snipeit.sh index 48be3a9797..e8547d3f7d 100755 --- a/snipeit.sh +++ b/snipeit.sh @@ -105,6 +105,17 @@ install_packages () { fi done; ;; + raspbian) + for p in $PACKAGES; do + if dpkg -s "$p" >/dev/null 2>&1; then + echo " * $p already installed" + else + echo " * Installing $p" + log "DEBIAN_FRONTEND=noninteractive apt-get install -y -t buster $p" + fi + done; + ;; + centos) for p in $PACKAGES; do if yum list installed "$p" >/dev/null 2>&1; then @@ -146,7 +157,7 @@ create_virtualhost () { create_user () { echo "* Creating Snipe-IT user." - if [ "$distro" == "ubuntu" ] || [ "$distro" == "debian" ] ; then + if [ "$distro" == "ubuntu" ] || [ "$distro" == "debian" ] || [ "$distro" == "raspbian" ] ; then adduser --quiet --disabled-password --gecos '""' "$APP_USER" else adduser "$APP_USER" @@ -295,6 +306,12 @@ case $distro in apache_group=www-data apachefile=/etc/apache2/sites-available/$APP_NAME.conf ;; + *Raspbian*) + echo " The installer has detected $distro version $version codename $codename." + distro=raspbian + apache_group=www-data + apachefile=/etc/apache2/sites-available/$APP_NAME.conf + ;; *debian*) echo " The installer has detected $distro version $version codename $codename." distro=debian @@ -532,7 +549,57 @@ case $distro in exit 1 fi ;; - centos) + raspbian) + if [ "$version" == "9.4" ]; then + # Install for Raspbian 9.4 + tzone=$(cat /etc/timezone) + cat >/etc/apt/sources.list.d/10-buster.list </etc/apt/preferences.d/10-buster <