mirror of
https://github.com/mail-in-a-box/mailinabox.git
synced 2026-04-01 21:27:22 +02:00
Merge remote-tracking branch 'upstream/main' into merge-upstream
# Conflicts: # setup/firstuser.sh # setup/functions.sh # setup/mail-users.sh # setup/management.sh # setup/network-checks.sh # setup/nextcloud.sh # setup/questions.sh # setup/ssl.sh # setup/start.sh # setup/system.sh # setup/webmail.sh # tools/archive_conf_files.sh # tools/web_update
This commit is contained in:
@@ -61,9 +61,9 @@ hide_output $venv/bin/python3 -m pip install --upgrade \
|
||||
# CONFIGURATION
|
||||
|
||||
# Create a backup directory and a random key for encrypting backups.
|
||||
mkdir -p $STORAGE_ROOT/backup
|
||||
if [ ! -f $STORAGE_ROOT/backup/secret_key.txt ]; then
|
||||
$(umask 077; openssl rand -base64 2048 > $STORAGE_ROOT/backup/secret_key.txt)
|
||||
mkdir -p "$STORAGE_ROOT/backup"
|
||||
if [ ! -f "$STORAGE_ROOT/backup/secret_key.txt" ]; then
|
||||
umask 077; openssl rand -base64 2048 > "$STORAGE_ROOT/backup/secret_key.txt"
|
||||
fi
|
||||
|
||||
|
||||
@@ -109,8 +109,8 @@ tr -cd '[:xdigit:]' < /dev/urandom | head -c 32 > /var/lib/mailinabox/api.key
|
||||
chmod 640 /var/lib/mailinabox/api.key
|
||||
|
||||
source $venv/bin/activate
|
||||
export PYTHONPATH=$(pwd)/management
|
||||
exec gunicorn --log-level ${MGMT_LOG_LEVEL:-info} -b localhost:10222 -w 1 --timeout 630 wsgi:app
|
||||
export PYTHONPATH=$PWD/management
|
||||
exec gunicorn --log-level "${MGMT_LOG_LEVEL:-info}" -b localhost:10222 -w 1 --timeout 630 wsgi:app
|
||||
EOF
|
||||
chmod +x $inst_dir/start
|
||||
cp --remove-destination conf/mailinabox.service /lib/systemd/system/mailinabox.service # target was previously a symlink so remove it first
|
||||
@@ -126,7 +126,7 @@ minute=$((RANDOM % 60)) # avoid overloading mailinabox.email
|
||||
cat > /etc/cron.d/mailinabox-nightly << EOF;
|
||||
# Mail-in-a-Box --- Do not edit / will be overwritten on update.
|
||||
# Run nightly tasks: backup, status checks.
|
||||
$minute 3 * * * root (cd $(pwd) && management/daily_tasks.sh)
|
||||
$minute 3 * * * root (cd $PWD && management/daily_tasks.sh)
|
||||
EOF
|
||||
|
||||
# Start the management server.
|
||||
|
||||
Reference in New Issue
Block a user