Skip to content

Instantly share code, notes, and snippets.

@daurnimator
Created August 4, 2014 01:55
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save daurnimator/1f9066bc32ad293b005b to your computer and use it in GitHub Desktop.
Save daurnimator/1f9066bc32ad293b005b to your computer and use it in GitHub Desktop.
systemd unit for prosody; assumes mod_systemd
[Unit]
Description=XMPP (Jabber) Server
After=network.target
[Service]
User=prosody
ProtectSystem=full
ProtectHome=true
Type=notify
ExecStart=/usr/bin/prosody
ExecReload=/usr/bin/kill -HUP $MAINPID
Restart=on-failure
WatchdogSec=5s
RuntimeDirectory=prosody
RuntimeDirectoryMode=0755
PIDFile=/run/prosody/prosody.pid
[Install]
WantedBy=multi-user.target
@zdzichu
Copy link

zdzichu commented Oct 22, 2014

You could drop PIDfile from, and use sd_notify(MAINPID=xxx) from inside Prosody. This would make unit file 3 lines shorted (you would be able to drop Runtime*= too)

@daurnimator
Copy link
Author

@zdzichu thanks for the suggestion! only just saw it.... github didn't alert me for some reason.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment