mirror of
				https://github.com/mail-in-a-box/mailinabox.git
				synced 2025-11-02 19:20:54 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			79 lines
		
	
	
		
			2.0 KiB
		
	
	
	
		
			Ruby
		
	
	
	
	
	
			
		
		
	
	
			79 lines
		
	
	
		
			2.0 KiB
		
	
	
	
		
			Ruby
		
	
	
	
	
	
#####
 | 
						|
##### This file is part of Mail-in-a-Box-LDAP which is released under the
 | 
						|
##### terms of the GNU Affero General Public License as published by the
 | 
						|
##### Free Software Foundation, either version 3 of the License, or (at
 | 
						|
##### your option) any later version. See file LICENSE or go to
 | 
						|
##### https://github.com/downtownallday/mailinabox-ldap for full license
 | 
						|
##### details.
 | 
						|
#####
 | 
						|
 | 
						|
load '../funcs.rb'
 | 
						|
 | 
						|
Vagrant.configure("2") do |config|
 | 
						|
 | 
						|
  config.vm.synced_folder "../../..", "/mailinabox", id: "mailinabox", automount: false
 | 
						|
  config.vm.network "public_network", bridge: "#$default_network_interface"
 | 
						|
  use_preloaded_box config, "ubuntu/jammy64", ".."
 | 
						|
 | 
						|
  if ENV['tests']=='ciab'
 | 
						|
 | 
						|
    # vanilla connected to ciab (ciab does not need to be up)
 | 
						|
 | 
						|
    config.vm.define "vanilla" do |m1|
 | 
						|
      m1.vm.provision :shell, :inline => <<-SH
 | 
						|
cat >/tmp/provision.sh <<EOF
 | 
						|
#!/bin/bash
 | 
						|
if [ \\$EUID -ne 0 ]; then
 | 
						|
   echo "Must be root"
 | 
						|
   exit 1
 | 
						|
fi
 | 
						|
cd /mailinabox
 | 
						|
export PRIMARY_HOSTNAME=vanilla.local
 | 
						|
export NC_PROTO=https
 | 
						|
export NC_HOST=vanilla-ciab.local
 | 
						|
export NC_PORT=443
 | 
						|
export NC_PREFIX=/
 | 
						|
export SKIP_SYSTEM_UPDATE=0
 | 
						|
tests/system-setup/vanilla.sh --qa-ca --enable-mod=remote-nextcloud
 | 
						|
if ! ufw status | grep remote_nextcloud >/dev/null; then
 | 
						|
   # firewall rules aren't added when ciab is down
 | 
						|
   # allow ldaps from anywhere
 | 
						|
   ufw allow ldaps
 | 
						|
fi
 | 
						|
EOF
 | 
						|
chmod +x /tmp/provision.sh
 | 
						|
/tmp/provision.sh
 | 
						|
SH
 | 
						|
    end  # vanilla connected to ciab
 | 
						|
 | 
						|
  else
 | 
						|
 | 
						|
 | 
						|
    # vanilla (default) install
 | 
						|
 | 
						|
    config.vm.define "vanilla" do |m1|
 | 
						|
      m1.vm.provision :shell, :inline => <<-SH
 | 
						|
cat >/tmp/provision.sh <<EOF
 | 
						|
#!/bin/bash
 | 
						|
if [ \\$EUID -ne 0 ]; then
 | 
						|
   echo "Must be root"
 | 
						|
   exit 1
 | 
						|
fi
 | 
						|
cd /mailinabox
 | 
						|
export PRIMARY_HOSTNAME=vanilla.local
 | 
						|
#export FEATURE_MUNIN=false
 | 
						|
#export FEATURE_NEXTCLOUD=false
 | 
						|
export SKIP_SYSTEM_UPDATE=0
 | 
						|
tests/system-setup/vanilla.sh
 | 
						|
#   --enable-mod=roundcube-master \
 | 
						|
#   --enable-mod=roundcube-debug \
 | 
						|
#   --enable-mod=rcmcarddav-composer
 | 
						|
EOF
 | 
						|
chmod +x /tmp/provision.sh
 | 
						|
/tmp/provision.sh
 | 
						|
SH
 | 
						|
    end  # vanilla (default)
 | 
						|
 | 
						|
  end  
 | 
						|
end
 |