Skip to content

Commit

Permalink
haraka.service: Type=simple (haraka#2612)
Browse files Browse the repository at this point in the history
* haraka.service: Type=simple

`systemctl start hakara.service` was hanging, but the service was started ok. This is because the process wasn't forking and does not appear to have an option to do so. 

https://superuser.com/a/1274913/117296

> a) If the service starts and keeps running, and the prompt does not return until you press Control-C or stop the service in some other way: then Type = simple is the right choice.
> b) If the prompt returns but the service keeps running in the background (i.e. the service daemonizes itself on its own), then Type = forking is the right choice.

* update haraka.service systemd file

Add comment explaining that `daemonize` should be `false`
change recommended path for the unit file - see https://unix.stackexchange.com/a/208352
  • Loading branch information
tomscytale authored and msimerson committed Mar 16, 2019
1 parent 5d6d70f commit 01b3761
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions contrib/haraka.service
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
#
# systemd service file for Haraka
#
# Put this file in /usr/lib/systemd/system, modify the paths to suit
# then run:
# Ensure that `daemonize` in `smpt.ini` is set to `false` (which is the default value).
#
# Put this file in /etc/systemd/system, modify the paths to suit, then run:
# sudo systemctl enable haraka
# sudo systemctl start haraka
#
Expand All @@ -12,7 +13,7 @@ Description=Haraka MTA
After=syslog.target network.target remote-fs.target nss-lookup.target

[Service]
Type=forking
Type=simple
PIDFile=/var/run/haraka.pid
ExecStart=/usr/bin/haraka -c /path/to/your/config
KillMode=process
Expand Down

0 comments on commit 01b3761

Please sign in to comment.