A free open source IT asset/license management system
Ubuntu Bionic Beaver 18.04 support (#5687)
tiagom62d204eebab995
diff --git a/Vagrantfile b/Vagrantfileindex eabfe07b49..b65979b7e9 100644--- a/Vagrantfile+++ b/Vagrantfile@@ -5,6 +5,14 @@ SNIPEIT_SH_URL= "https://raw.githubusercontent.com/snipe/snipe-it/master/snipeitNETWORK_BRIDGE= "en0: Wi-Fi (AirPort)"Vagrant.configure("2") do |config|+ config.vm.define "bionic" do |bionic|+ bionic.vm.box = "ubuntu/bionic64"+ bionic.vm.hostname = 'bionic'+ bionic.vm.network "public_network", bridge: NETWORK_BRIDGE+ bionic.vm.provision :shell, :inline => "wget #{SNIPEIT_SH_URL}"+ bionic.vm.provision :shell, :inline => "chmod 755 snipeit.sh"+ end+config.vm.define "xenial" do |xenial|xenial.vm.box = "ubuntu/xenial64"xenial.vm.hostname = 'xenial'diff --git a/snipeit.sh b/snipeit.shindex df11c8e7b0..c1b8a6d7d3 100755--- a/snipeit.sh+++ b/snipeit.sh@@ -381,7 +381,41 @@ case $distro infi;;ubuntu)- if [[ "$version" =~ 16.04 ]]; then+ if [ "$version" == "18.04" ]; then+ # Install for Ubuntu 18.04+ webdir=/var/www+ ownergroup=www-data:www-data+ tzone=$(cat /etc/timezone)+ apachefile=/etc/apache2/sites-available/$name.conf++ echo -n "* Updating installed packages."+ log "apt-get update && DEBIAN_FRONTEND=noninteractive apt-get -y upgrade" & pid=$!+ progress++ echo "* Installing Apache httpd, PHP, MariaDB and other requirements."+ PACKAGES="mariadb-server mariadb-client apache2 libapache2-mod-php php php-mcrypt php-curl php-mysql php-gd php-ldap php-zip php-mbstring php-xml php-bcmath curl git unzip"+ install_packages++ echo "* Configuring Apache."+ create_virtualhost+ log "phpenmod mcrypt"+ log "phpenmod mbstring"+ log "a2enmod rewrite"+ log "a2ensite $name.conf"++ set_hosts++ echo "* Starting MariaDB."+ log "systemctl start mariadb.service"++ echo "* Securing MariaDB."+ /usr/bin/mysql_secure_installation++ install_snipeit++ echo "* Restarting Apache httpd."+ log "systemctl restart apache2"+ elif [ "$version" == "16.04" ]; then# Install for Ubuntu 16.04webdir=/var/wwwownergroup=www-data:www-data@@ -421,7 +455,7 @@ case $distro inecho "* Restarting Apache httpd."log "service apache2 restart"- elif [[ "$version" =~ 14.04 ]]; then+ elif [ "$version" == "14.04" ]; then# Install for Ubuntu 14.04webdir=/var/wwwownergroup=www-data:www-data