mirror of
				https://github.com/mail-in-a-box/mailinabox.git
				synced 2025-11-03 19:30:54 +00:00 
			
		
		
		
	Modify setup scripts to compatibility with Debian 12.
Expecially changed apt packages
This commit is contained in:
		
							parent
							
								
									f0bdfb2a1f
								
							
						
					
					
						commit
						f5e583d76d
					
				@ -297,7 +297,7 @@ def perform_backup(full_backup):
 | 
				
			|||||||
			if quit:
 | 
								if quit:
 | 
				
			||||||
				sys.exit(code)
 | 
									sys.exit(code)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	service_command("php8.0-fpm", "stop", quit=True)
 | 
						service_command("php8.2-fpm", "stop", quit=True)
 | 
				
			||||||
	service_command("postfix", "stop", quit=True)
 | 
						service_command("postfix", "stop", quit=True)
 | 
				
			||||||
	service_command("dovecot", "stop", quit=True)
 | 
						service_command("dovecot", "stop", quit=True)
 | 
				
			||||||
	service_command("postgrey", "stop", quit=True)
 | 
						service_command("postgrey", "stop", quit=True)
 | 
				
			||||||
@ -334,7 +334,7 @@ def perform_backup(full_backup):
 | 
				
			|||||||
		service_command("postgrey", "start", quit=False)
 | 
							service_command("postgrey", "start", quit=False)
 | 
				
			||||||
		service_command("dovecot", "start", quit=False)
 | 
							service_command("dovecot", "start", quit=False)
 | 
				
			||||||
		service_command("postfix", "start", quit=False)
 | 
							service_command("postfix", "start", quit=False)
 | 
				
			||||||
		service_command("php8.0-fpm", "start", quit=False)
 | 
							service_command("php8.2-fpm", "start", quit=False)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	# Remove old backups. This deletes all backup data no longer needed
 | 
						# Remove old backups. This deletes all backup data no longer needed
 | 
				
			||||||
	# from more than 3 days ago.
 | 
						# from more than 3 days ago.
 | 
				
			||||||
 | 
				
			|||||||
@ -17,6 +17,7 @@ mkdir -p /var/run/nsd
 | 
				
			|||||||
mkdir -p /etc/nsd
 | 
					mkdir -p /etc/nsd
 | 
				
			||||||
mkdir -p /etc/nsd/zones
 | 
					mkdir -p /etc/nsd/zones
 | 
				
			||||||
touch /etc/nsd/zones.conf
 | 
					touch /etc/nsd/zones.conf
 | 
				
			||||||
 | 
					touch /etc/nsd/nsd.conf
 | 
				
			||||||
 | 
					
 | 
				
			||||||
cat > /etc/nsd/nsd.conf << EOF;
 | 
					cat > /etc/nsd/nsd.conf << EOF;
 | 
				
			||||||
# Do not edit. Overwritten by Mail-in-a-Box setup.
 | 
					# Do not edit. Overwritten by Mail-in-a-Box setup.
 | 
				
			||||||
 | 
				
			|||||||
@ -55,3 +55,6 @@ if [ -z "$(management/cli.py user)" ]; then
 | 
				
			|||||||
	# Create an alias to which we'll direct all automatically-created administrative aliases.
 | 
						# Create an alias to which we'll direct all automatically-created administrative aliases.
 | 
				
			||||||
	management/cli.py alias add administrator@$PRIMARY_HOSTNAME $EMAIL_ADDR > /dev/null
 | 
						management/cli.py alias add administrator@$PRIMARY_HOSTNAME $EMAIL_ADDR > /dev/null
 | 
				
			||||||
fi
 | 
					fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Kick everything that may have been missed
 | 
				
			||||||
 | 
					management/mailconfig.py update
 | 
				
			||||||
@ -4,7 +4,7 @@
 | 
				
			|||||||
# -o pipefail: don't ignore errors in the non-last command in a pipeline
 | 
					# -o pipefail: don't ignore errors in the non-last command in a pipeline
 | 
				
			||||||
set -euo pipefail
 | 
					set -euo pipefail
 | 
				
			||||||
 | 
					
 | 
				
			||||||
PHP_VER=8.0
 | 
					PHP_VER=8.2
 | 
				
			||||||
 | 
					
 | 
				
			||||||
function hide_output {
 | 
					function hide_output {
 | 
				
			||||||
	# This function hides the output of a command unless the command fails
 | 
						# This function hides the output of a command unless the command fails
 | 
				
			||||||
 | 
				
			|||||||
@ -14,12 +14,15 @@ echo "Installing Mail-in-a-Box system management daemon..."
 | 
				
			|||||||
#
 | 
					#
 | 
				
			||||||
# certbot installs EFF's certbot which we use to
 | 
					# certbot installs EFF's certbot which we use to
 | 
				
			||||||
# provision free TLS certificates.
 | 
					# provision free TLS certificates.
 | 
				
			||||||
apt_install duplicity python3-pip virtualenv certbot rsync
 | 
					apt_install python3-pip python3-gpg virtualenv certbot rsync librsync2 python3-fasteners python3-future python3-lockfile \
 | 
				
			||||||
 | 
								gcc python3-dev librsync-dev gettext
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					apt_get_quiet remove --autoremove --purge duplicity || /bin/true
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# b2sdk is used for backblaze backups.
 | 
					# b2sdk is used for backblaze backups.
 | 
				
			||||||
# boto3 is used for amazon aws backups.
 | 
					# boto3 is used for amazon aws backups.
 | 
				
			||||||
# Both are installed outside the pipenv, so they can be used by duplicity
 | 
					# Both are installed outside the pipenv, so they can be used by duplicity
 | 
				
			||||||
hide_output pip3 install --upgrade b2sdk boto3
 | 
					hide_output pip3 install --upgrade b2sdk boto3 duplicity
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Create a virtualenv for the installation of Python 3 packages
 | 
					# Create a virtualenv for the installation of Python 3 packages
 | 
				
			||||||
# used by the management daemon.
 | 
					# used by the management daemon.
 | 
				
			||||||
@ -27,12 +30,15 @@ inst_dir=/usr/local/lib/mailinabox
 | 
				
			|||||||
mkdir -p $inst_dir
 | 
					mkdir -p $inst_dir
 | 
				
			||||||
venv=$inst_dir/env
 | 
					venv=$inst_dir/env
 | 
				
			||||||
if [ ! -d $venv ]; then
 | 
					if [ ! -d $venv ]; then
 | 
				
			||||||
	# A bug specific to Ubuntu 22.04 and Python 3.10 requires
 | 
						hide_output virtualenv -ppython3 $venv
 | 
				
			||||||
	# forcing a virtualenv directory layout option (see #2335
 | 
					elif [ ! -f $venv/.oscode ]; then
 | 
				
			||||||
	# and https://github.com/pypa/virtualenv/pull/2415). In
 | 
						echo "Re-creating Python environment..."
 | 
				
			||||||
	# our issue, reportedly installing python3-distutils didn't
 | 
						rm -rf $venv
 | 
				
			||||||
	# fix the problem.)
 | 
						hide_output virtualenv -ppython3 $venv
 | 
				
			||||||
	export DEB_PYTHON_INSTALL_LAYOUT='deb'
 | 
					elif [ "$(cat $venv/.oscode)" != $(get_os_code) ]; then
 | 
				
			||||||
 | 
						echo "Existing management environment is from an earlier version of the OS you're running."
 | 
				
			||||||
 | 
						echo "Re-creating Python environment..."
 | 
				
			||||||
 | 
						rm -rf $venv
 | 
				
			||||||
	hide_output virtualenv -ppython3 $venv
 | 
						hide_output virtualenv -ppython3 $venv
 | 
				
			||||||
fi
 | 
					fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -48,10 +48,10 @@ user_external_hash=a494073dcdecbbbc79a9c77f72524ac9994d2eec
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
apt-get purge -qq -y owncloud* # we used to use the package manager
 | 
					apt-get purge -qq -y owncloud* # we used to use the package manager
 | 
				
			||||||
 | 
					
 | 
				
			||||||
apt_install curl php${PHP_VER} php${PHP_VER}-fpm \
 | 
					apt_install php php-fpm \
 | 
				
			||||||
	php${PHP_VER}-cli php${PHP_VER}-sqlite3 php${PHP_VER}-gd php${PHP_VER}-imap php${PHP_VER}-curl \
 | 
						php-cli php-sqlite3 php-gd php-imap php-curl php-pear curl \
 | 
				
			||||||
	php${PHP_VER}-dev php${PHP_VER}-gd php${PHP_VER}-xml php${PHP_VER}-mbstring php${PHP_VER}-zip php${PHP_VER}-apcu \
 | 
						php-dev php-xml php-mbstring php-zip php-apcu php-json \
 | 
				
			||||||
	php${PHP_VER}-intl php${PHP_VER}-imagick php${PHP_VER}-gmp php${PHP_VER}-bcmath
 | 
						php-intl php-imagick php-gmp php-bcmath
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Enable APC before Nextcloud tools are run.
 | 
					# Enable APC before Nextcloud tools are run.
 | 
				
			||||||
tools/editconf.py /etc/php/$PHP_VER/mods-available/apcu.ini -c ';' \
 | 
					tools/editconf.py /etc/php/$PHP_VER/mods-available/apcu.ini -c ';' \
 | 
				
			||||||
@ -386,14 +386,14 @@ sqlite3 $STORAGE_ROOT/owncloud/owncloud.db "UPDATE oc_users_external SET backend
 | 
				
			|||||||
cat > /etc/cron.d/mailinabox-nextcloud << EOF;
 | 
					cat > /etc/cron.d/mailinabox-nextcloud << EOF;
 | 
				
			||||||
#!/bin/bash
 | 
					#!/bin/bash
 | 
				
			||||||
# Mail-in-a-Box
 | 
					# Mail-in-a-Box
 | 
				
			||||||
*/5 * * * *	root	sudo -u www-data php$PHP_VER -f /usr/local/lib/owncloud/cron.php
 | 
					*/5 * * * *	root	sudo -u www-data php$ -f /usr/local/lib/owncloud/cron.php
 | 
				
			||||||
*/5 * * * *	root	sudo -u www-data php$PHP_VER -f /usr/local/lib/owncloud/occ dav:send-event-reminders
 | 
					*/5 * * * *	root	sudo -u www-data php -f /usr/local/lib/owncloud/occ dav:send-event-reminders
 | 
				
			||||||
EOF
 | 
					EOF
 | 
				
			||||||
chmod +x /etc/cron.d/mailinabox-nextcloud
 | 
					chmod +x /etc/cron.d/mailinabox-nextcloud
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# We also need to change the sending mode from background-job to occ.
 | 
					# We also need to change the sending mode from background-job to occ.
 | 
				
			||||||
# Or else the reminders will just be sent as soon as possible when the background jobs run.
 | 
					# Or else the reminders will just be sent as soon as possible when the background jobs run.
 | 
				
			||||||
hide_output sudo -u www-data php$PHP_VER -f /usr/local/lib/owncloud/occ config:app:set dav sendEventRemindersMode --value occ
 | 
					hide_output sudo -u www-data php-f /usr/local/lib/owncloud/occ config:app:set dav sendEventRemindersMode --value occ
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Now set the config to read-only.
 | 
					# Now set the config to read-only.
 | 
				
			||||||
# Do this only at the very bottom when no further occ commands are needed.
 | 
					# Do this only at the very bottom when no further occ commands are needed.
 | 
				
			||||||
 | 
				
			|||||||
@ -9,12 +9,14 @@ fi
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
# Check that we are running on Ubuntu 20.04 LTS (or 20.04.xx).
 | 
					# Check that we are running on Ubuntu 20.04 LTS (or 20.04.xx).
 | 
				
			||||||
if [ "$( lsb_release --id --short )" != "Ubuntu" ] || [ "$( lsb_release --release --short )" != "22.04" ]; then
 | 
					if [ "$( lsb_release --id --short )" != "Ubuntu" ] || [ "$( lsb_release --release --short )" != "22.04" ]; then
 | 
				
			||||||
	echo "Mail-in-a-Box only supports being installed on Ubuntu 22.04, sorry. You are running:"
 | 
						if [ "$( lsb_release --id --short )" != "Debian" ] || [ "$( lsb_release --release --short )" != "12" ]; then
 | 
				
			||||||
 | 
						echo "Mail-in-a-Box only supports being installed on Ubuntu 22.04 or Debian 12, sorry. You are running:"
 | 
				
			||||||
	echo
 | 
						echo
 | 
				
			||||||
	lsb_release --description --short
 | 
						lsb_release --description --short
 | 
				
			||||||
	echo
 | 
						echo
 | 
				
			||||||
	echo "We can't write scripts that run on every possible setup, sorry."
 | 
						echo "We can't write scripts that run on every possible setup, sorry."
 | 
				
			||||||
	exit 1
 | 
						exit 1
 | 
				
			||||||
 | 
						fi
 | 
				
			||||||
fi
 | 
					fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Check that we have enough memory.
 | 
					# Check that we have enough memory.
 | 
				
			||||||
@ -26,7 +28,7 @@ fi
 | 
				
			|||||||
#
 | 
					#
 | 
				
			||||||
# Skip the check if we appear to be running inside of Vagrant, because that's really just for testing.
 | 
					# Skip the check if we appear to be running inside of Vagrant, because that's really just for testing.
 | 
				
			||||||
TOTAL_PHYSICAL_MEM=$(head -n 1 /proc/meminfo | awk '{print $2}')
 | 
					TOTAL_PHYSICAL_MEM=$(head -n 1 /proc/meminfo | awk '{print $2}')
 | 
				
			||||||
if [ $TOTAL_PHYSICAL_MEM -lt 490000 ]; then
 | 
					if [ $TOTAL_PHYSICAL_MEM -lt 400000 ]; then
 | 
				
			||||||
if [ ! -d /vagrant ]; then
 | 
					if [ ! -d /vagrant ]; then
 | 
				
			||||||
	TOTAL_PHYSICAL_MEM=$(expr \( \( $TOTAL_PHYSICAL_MEM \* 1024 \) / 1000 \) / 1000)
 | 
						TOTAL_PHYSICAL_MEM=$(expr \( \( $TOTAL_PHYSICAL_MEM \* 1024 \) / 1000 \) / 1000)
 | 
				
			||||||
	echo "Your Mail-in-a-Box needs more memory (RAM) to function properly."
 | 
						echo "Your Mail-in-a-Box needs more memory (RAM) to function properly."
 | 
				
			||||||
 | 
				
			|||||||
@ -12,6 +12,7 @@ if [ -z "${NONINTERACTIVE:-}" ]; then
 | 
				
			|||||||
		apt_get_quiet install dialog python3 python3-pip  || exit 1
 | 
							apt_get_quiet install dialog python3 python3-pip  || exit 1
 | 
				
			||||||
	fi
 | 
						fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	# Installing email_validator is repeated in setup/management.sh, but in setup/management.sh
 | 
						# Installing email_validator is repeated in setup/management.sh, but in setup/management.sh
 | 
				
			||||||
	# we install it inside a virtualenv. In this script, we don't have the virtualenv yet
 | 
						# we install it inside a virtualenv. In this script, we don't have the virtualenv yet
 | 
				
			||||||
	# so we install the python package globally.
 | 
						# so we install the python package globally.
 | 
				
			||||||
 | 
				
			|||||||
@ -12,6 +12,8 @@
 | 
				
			|||||||
source /etc/mailinabox.conf # get global vars
 | 
					source /etc/mailinabox.conf # get global vars
 | 
				
			||||||
source setup/functions.sh # load our functions
 | 
					source setup/functions.sh # load our functions
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					touch /etc/default/spamassassin
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Install packages and basic configuration
 | 
					# Install packages and basic configuration
 | 
				
			||||||
# ----------------------------------------
 | 
					# ----------------------------------------
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -19,6 +19,9 @@ if ! locale -a | grep en_US.utf8 > /dev/null; then
 | 
				
			|||||||
    hide_output locale-gen en_US.UTF-8
 | 
					    hide_output locale-gen en_US.UTF-8
 | 
				
			||||||
fi
 | 
					fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#reinstalling  language package
 | 
				
			||||||
 | 
					dpkg-reconfigure locales
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export LANGUAGE=en_US.UTF-8
 | 
					export LANGUAGE=en_US.UTF-8
 | 
				
			||||||
export LC_ALL=en_US.UTF-8
 | 
					export LC_ALL=en_US.UTF-8
 | 
				
			||||||
export LANG=en_US.UTF-8
 | 
					export LANG=en_US.UTF-8
 | 
				
			||||||
@ -138,6 +141,7 @@ restart_service fail2ban
 | 
				
			|||||||
# If there aren't any mail users yet, create one.
 | 
					# If there aren't any mail users yet, create one.
 | 
				
			||||||
source setup/firstuser.sh
 | 
					source setup/firstuser.sh
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Register with Let's Encrypt, including agreeing to the Terms of Service.
 | 
					# Register with Let's Encrypt, including agreeing to the Terms of Service.
 | 
				
			||||||
# We'd let certbot ask the user interactively, but when this script is
 | 
					# We'd let certbot ask the user interactively, but when this script is
 | 
				
			||||||
# run in the recommended curl-pipe-to-bash method there is no TTY and
 | 
					# run in the recommended curl-pipe-to-bash method there is no TTY and
 | 
				
			||||||
 | 
				
			|||||||
@ -82,28 +82,6 @@ fi
 | 
				
			|||||||
# (See https://discourse.mailinabox.email/t/journalctl-reclaim-space-on-small-mailinabox/6728/11.)
 | 
					# (See https://discourse.mailinabox.email/t/journalctl-reclaim-space-on-small-mailinabox/6728/11.)
 | 
				
			||||||
tools/editconf.py /etc/systemd/journald.conf MaxRetentionSec=10day
 | 
					tools/editconf.py /etc/systemd/journald.conf MaxRetentionSec=10day
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# ### Add PPAs.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
# We install some non-standard Ubuntu packages maintained by other
 | 
					 | 
				
			||||||
# third-party providers. First ensure add-apt-repository is installed.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
if [ ! -f /usr/bin/add-apt-repository ]; then
 | 
					 | 
				
			||||||
	echo "Installing add-apt-repository..."
 | 
					 | 
				
			||||||
	hide_output apt-get update
 | 
					 | 
				
			||||||
	apt_install software-properties-common
 | 
					 | 
				
			||||||
fi
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
# Ensure the universe repository is enabled since some of our packages
 | 
					 | 
				
			||||||
# come from there and minimal Ubuntu installs may have it turned off.
 | 
					 | 
				
			||||||
hide_output add-apt-repository -y universe
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
# Install the duplicity PPA.
 | 
					 | 
				
			||||||
hide_output add-apt-repository -y ppa:duplicity-team/duplicity-release-git
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
# Stock PHP is now 8.1, but we're transitioning through 8.0 because
 | 
					 | 
				
			||||||
# of Nextcloud.
 | 
					 | 
				
			||||||
hide_output add-apt-repository --y ppa:ondrej/php
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
# ### Update Packages
 | 
					# ### Update Packages
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Update system packages to make sure we have the latest upstream versions
 | 
					# Update system packages to make sure we have the latest upstream versions
 | 
				
			||||||
@ -141,13 +119,7 @@ apt_install python3 python3-dev python3-pip python3-setuptools \
 | 
				
			|||||||
	pollinate openssh-client unzip \
 | 
						pollinate openssh-client unzip \
 | 
				
			||||||
	unattended-upgrades cron ntp fail2ban rsyslog
 | 
						unattended-upgrades cron ntp fail2ban rsyslog
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# ### Suppress Upgrade Prompts
 | 
					
 | 
				
			||||||
# When Ubuntu 20 comes out, we don't want users to be prompted to upgrade,
 | 
					 | 
				
			||||||
# because we don't yet support it.
 | 
					 | 
				
			||||||
if [ -f /etc/update-manager/release-upgrades ]; then
 | 
					 | 
				
			||||||
	tools/editconf.py /etc/update-manager/release-upgrades Prompt=never
 | 
					 | 
				
			||||||
	rm -f /var/lib/ubuntu-release-upgrader/release-upgrade-available
 | 
					 | 
				
			||||||
fi
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
# ### Set the system timezone
 | 
					# ### Set the system timezone
 | 
				
			||||||
#
 | 
					#
 | 
				
			||||||
@ -329,8 +301,11 @@ fi #NODOC
 | 
				
			|||||||
#  	If more queries than specified are sent, bind9 returns SERVFAIL. After flushing the cache during system checks,
 | 
					#  	If more queries than specified are sent, bind9 returns SERVFAIL. After flushing the cache during system checks,
 | 
				
			||||||
#	we ran into the limit thus we are increasing it from 75 (default value) to 100.
 | 
					#	we ran into the limit thus we are increasing it from 75 (default value) to 100.
 | 
				
			||||||
apt_install bind9
 | 
					apt_install bind9
 | 
				
			||||||
 | 
					touch /etc/default/bind9
 | 
				
			||||||
 | 
					touch /etc/default/named
 | 
				
			||||||
tools/editconf.py /etc/default/named \
 | 
					tools/editconf.py /etc/default/named \
 | 
				
			||||||
	"OPTIONS=\"-u bind -4\""
 | 
						"OPTIONS=\"-u bind -4\""
 | 
				
			||||||
 | 
						
 | 
				
			||||||
if ! grep -q "listen-on " /etc/bind/named.conf.options; then
 | 
					if ! grep -q "listen-on " /etc/bind/named.conf.options; then
 | 
				
			||||||
	# Add a listen-on directive if it doesn't exist inside the options block.
 | 
						# Add a listen-on directive if it doesn't exist inside the options block.
 | 
				
			||||||
	sed -i "s/^}/\n\tlisten-on { 127.0.0.1; };\n}/" /etc/bind/named.conf.options
 | 
						sed -i "s/^}/\n\tlisten-on { 127.0.0.1; };\n}/" /etc/bind/named.conf.options
 | 
				
			||||||
 | 
				
			|||||||
@ -19,7 +19,7 @@ fi
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
echo "Installing Nginx (web server)..."
 | 
					echo "Installing Nginx (web server)..."
 | 
				
			||||||
 | 
					
 | 
				
			||||||
apt_install nginx php${PHP_VER}-cli php${PHP_VER}-fpm idn2
 | 
					apt_install nginx php-cli php-fpm idn2
 | 
				
			||||||
 | 
					
 | 
				
			||||||
rm -f /etc/nginx/sites-enabled/default
 | 
					rm -f /etc/nginx/sites-enabled/default
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -22,9 +22,8 @@ source /etc/mailinabox.conf # load global vars
 | 
				
			|||||||
echo "Installing Roundcube (webmail)..."
 | 
					echo "Installing Roundcube (webmail)..."
 | 
				
			||||||
apt_install \
 | 
					apt_install \
 | 
				
			||||||
	dbconfig-common \
 | 
						dbconfig-common \
 | 
				
			||||||
	php${PHP_VER}-cli php${PHP_VER}-sqlite3 php${PHP_VER}-intl php${PHP_VER}-common php${PHP_VER}-curl php${PHP_VER}-imap \
 | 
						php-cli php-sqlite3 php-intl php-json php-common php-curl php-ldap	 \
 | 
				
			||||||
	php${PHP_VER}-gd php${PHP_VER}-pspell php${PHP_VER}-mbstring libjs-jquery libjs-jquery-mousewheel libmagic1 \
 | 
						php-gd php-pspell libjs-jquery libjs-jquery-mousewheel libmagic1 php-mbstring php-gnupg
 | 
				
			||||||
	sqlite3
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Install Roundcube from source if it is not already present or if it is out of date.
 | 
					# Install Roundcube from source if it is not already present or if it is out of date.
 | 
				
			||||||
# Combine the Roundcube version number with the commit hash of plugins to track
 | 
					# Combine the Roundcube version number with the commit hash of plugins to track
 | 
				
			||||||
 | 
				
			|||||||
@ -17,9 +17,9 @@ source /etc/mailinabox.conf # load global vars
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
echo "Installing Z-Push (Exchange/ActiveSync server)..."
 | 
					echo "Installing Z-Push (Exchange/ActiveSync server)..."
 | 
				
			||||||
apt_install \
 | 
					apt_install \
 | 
				
			||||||
       php${PHP_VER}-soap php${PHP_VER}-imap libawl-php php$PHP_VER-xml
 | 
					       php-soap php-imap libawl-php php-xml
 | 
				
			||||||
 | 
					
 | 
				
			||||||
phpenmod -v $PHP_VER imap
 | 
					phpenmod -v php imap
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Copy Z-Push into place.
 | 
					# Copy Z-Push into place.
 | 
				
			||||||
VERSION=2.7.1
 | 
					VERSION=2.7.1
 | 
				
			||||||
 | 
				
			|||||||
@ -26,7 +26,7 @@ if [ ! -f $1/config.php ]; then
 | 
				
			|||||||
fi
 | 
					fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
echo "Restoring backup from $1"
 | 
					echo "Restoring backup from $1"
 | 
				
			||||||
service php8.0-fpm stop
 | 
					service php8.2-fpm stop
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# remove the current ownCloud/Nextcloud installation
 | 
					# remove the current ownCloud/Nextcloud installation
 | 
				
			||||||
rm -rf /usr/local/lib/owncloud/
 | 
					rm -rf /usr/local/lib/owncloud/
 | 
				
			||||||
@ -45,5 +45,5 @@ chown www-data:www-data $STORAGE_ROOT/owncloud/config.php
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
sudo -u www-data php$PHP_VER /usr/local/lib/owncloud/occ maintenance:mode --off
 | 
					sudo -u www-data php$PHP_VER /usr/local/lib/owncloud/occ maintenance:mode --off
 | 
				
			||||||
 | 
					
 | 
				
			||||||
service php8.0-fpm start
 | 
					service php8.2-fpm start
 | 
				
			||||||
echo "Done"
 | 
					echo "Done"
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user