Merge branch 'weiss-systemd-unit-improvements' (#1346)

This commit is contained in:
Christophe Romain 2016-11-23 14:37:34 +01:00
commit cbda2e038e
1 changed files with 5 additions and 11 deletions

View File

@ -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