mirror of
https://github.com/mail-in-a-box/mailinabox.git
synced 2026-03-24 19:07:23 +01:00
move management into a daemon service running as root
* Created a new Python/flask-based management daemon. * Moved the mail user management core code from tools/mail.py to the new daemon. * tools/mail.py is a wrapper around the daemon and can be run as a non-root user. * Adding a new initscript for the management daemon. * Moving dns_update.sh to the management daemon, called via curl'ing the daemon's API. This also now runs the DNS update after mail users and aliases are added/removed, which sets up new domains' DNS as needed.
This commit is contained in:
18
setup/management.sh
Executable file
18
setup/management.sh
Executable file
@@ -0,0 +1,18 @@
|
||||
#!/bin/bash
|
||||
|
||||
source setup/functions.sh
|
||||
|
||||
apt_install python3-flask links
|
||||
|
||||
# Link the management server daemon into a well known location.
|
||||
rm -f /usr/bin/mailinabox-daemon
|
||||
ln -s `pwd`/management/daemon.py /usr/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
|
||||
Reference in New Issue
Block a user