mirror of
https://github.com/mail-in-a-box/mailinabox.git
synced 2024-11-22 02:17:26 +00:00
26 lines
764 B
Bash
Executable File
26 lines
764 B
Bash
Executable File
#!/bin/bash
|
|
|
|
source setup/functions.sh
|
|
|
|
apt_install python3-flask links duplicity libyaml-dev
|
|
pip3 install rtyaml
|
|
|
|
# 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
|
|
openssl rand -base64 2048 > $STORAGE_ROOT/backup/secret_key.txt
|
|
fi
|
|
|
|
# Link the management server daemon into a well known location.
|
|
rm -f /usr/local/bin/mailinabox-daemon
|
|
ln -s `pwd`/management/daemon.py /usr/local/bin/mailinabox-daemon
|
|
|
|
# Create an init script to start the management daemon and keep it
|
|
# running after a reboot.
|
|
rm -f /etc/init.d/mailinabox
|
|
ln -s $(pwd)/conf/management-initscript /etc/init.d/mailinabox
|
|
update-rc.d mailinabox defaults
|
|
|
|
# Start it.
|
|
service mailinabox restart
|