Ubuntu Bionic Beaver 18.04 support (#5687)

* bionic box

* bionic beaver support
This commit is contained in:
tiagom62 2018-06-09 14:21:28 -04:00 committed by snipe
parent 968d7d1f11
commit d204eebab9
2 changed files with 44 additions and 2 deletions

8
Vagrantfile vendored
View file

@ -5,6 +5,14 @@ SNIPEIT_SH_URL= "https://raw.githubusercontent.com/snipe/snipe-it/master/snipeit
NETWORK_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'

View file

@ -381,7 +381,41 @@ case $distro in
fi
;;
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.04
webdir=/var/www
ownergroup=www-data:www-data
@ -421,7 +455,7 @@ case $distro in
echo "* Restarting Apache httpd."
log "service apache2 restart"
elif [[ "$version" =~ 14.04 ]]; then
elif [ "$version" == "14.04" ]; then
# Install for Ubuntu 14.04
webdir=/var/www
ownergroup=www-data:www-data