diff --git a/snipeit.sh b/snipeit.sh index 48be3a979780..e8547d3f7d30 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 <