aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristophe Romain <christophe.romain@process-one.net>2016-11-23 14:37:34 +0100
committerChristophe Romain <christophe.romain@process-one.net>2016-11-23 14:37:34 +0100
commitcbda2e038e82f30619c2f2519f5f6aaa61662e4a (patch)
treef6b2a61461eb2a20cb9fe0009e29427a4f47f734
parentFix typo in copyright date (diff)
parentMerge branch 'systemd-unit-improvements' of https://github.com/weiss/ejabberd... (diff)
Merge branch 'weiss-systemd-unit-improvements' (#1346)
-rw-r--r--ejabberd.service.template16
1 files changed, 5 insertions, 11 deletions
diff --git a/ejabberd.service.template b/ejabberd.service.template
index 49ba14737..a70d2254d 100644
--- a/ejabberd.service.template
+++ b/ejabberd.service.template
@@ -3,22 +3,16 @@ Description=XMPP Server
After=network.target
[Service]
+Type=forking
User=ejabberd
Group=ejabberd
-LimitNOFILE=16000
+LimitNOFILE=65536
+Restart=on-failure
RestartSec=5
-ExecStart=@ctlscriptpath@/ejabberdctl start
-ExecStop=@ctlscriptpath@/ejabberdctl stop
-ExecReload=@ctlscriptpath@/ejabberdctl reload_config
-Type=oneshot
-RemainAfterExit=yes
-# The CAP_DAC_OVERRIDE capability is required for pam authentication to work
-CapabilityBoundingSet=CAP_DAC_OVERRIDE
-PrivateTmp=true
+ExecStart=/bin/sh -c '@ctlscriptpath@/ejabberdctl start && @ctlscriptpath@/ejabberdctl started'
+ExecStop=/bin/sh -c '@ctlscriptpath@/ejabberdctl stop && @ctlscriptpath@/ejabberdctl stopped'
PrivateDevices=true
-ProtectHome=true
ProtectSystem=full
-NoNewPrivileges=true
[Install]
WantedBy=multi-user.target