1
0
mirror of https://github.com/mail-in-a-box/mailinabox.git synced 2024-11-22 02:17:26 +00:00

systemctl link should use -f to avoid an error if a system service already exists with that name but points to a different file

https://discourse.mailinabox.email/t/new-error-failed-systemctl-link-conf-mailinabox-service/4626/2
This commit is contained in:
Joshua Tauberer 2019-02-26 18:15:36 -05:00
parent adddd95e38
commit 149552f79b
3 changed files with 3 additions and 2 deletions

View File

@ -7,6 +7,7 @@ In Development
System:
* Missing brute force login attack prevention (fail2ban) filters which stopped working on Ubuntu 18.04 were added back.
* Upgrades would fail if Mail-in-a-Box moved to a different directory in `systemctl link`.
Mail:

View File

@ -93,7 +93,7 @@ source $venv/bin/activate
exec python `pwd`/management/daemon.py
EOF
chmod +x $inst_dir/start
hide_output systemctl link conf/mailinabox.service
hide_output systemctl link -f conf/mailinabox.service
hide_output systemctl daemon-reload
hide_output systemctl enable mailinabox.service

View File

@ -64,7 +64,7 @@ mkdir -p /var/lib/munin-node/plugin-state/
# Create a systemd service for munin.
ln -sf $(pwd)/management/munin_start.sh /usr/local/lib/mailinabox/munin_start.sh
chmod 0744 /usr/local/lib/mailinabox/munin_start.sh
hide_output systemctl link conf/munin.service
hide_output systemctl link -f conf/munin.service
hide_output systemctl daemon-reload
hide_output systemctl unmask munin.service
hide_output systemctl enable munin.service