kakwa / ldapcherry

Web UI for managing users and groups in multiple directory services.
MIT License
225 stars 70 forks source link

Systemd config? #25

Closed mrPsycho closed 5 years ago

mrPsycho commented 5 years ago

Hello,

i'm trying to create systemd config file:

[Service]
WorkingDirectory=/opt/ldapcherry
ExecStart=/usr/local/bin/ldapcherryd -c /etc/ldapcherry/ldapcherry.ini -d -p /var/run/ldapcherry.pid
Restart=always
StandardOutput=syslog
StandardError=syslog
SyslogIdentifier=ldapcherry
User=ldapcherry
Group=ldapcherry
PIDFile=/var/run/ldapcherry.pid

[Install]
WantedBy=multi-user.target

but it doesn't work... syslog says next:

Mar 26 18:18:04 apple ldapcherry[30258]: application started
Mar 26 18:18:04 apple ldapcherry[30258]: ENGINE Listening for SIGTERM.
Mar 26 18:18:04 apple ldapcherry[30258]: ENGINE Listening for SIGHUP.
Mar 26 18:18:04 apple ldapcherry[30258]: ENGINE Listening for SIGUSR1.
Mar 26 18:18:04 apple ldapcherry[30258]: ENGINE Bus STARTING
Mar 26 18:18:04 apple ldapcherry[30258]: ENGINE Forking once.
Mar 26 18:18:04 apple ldapcherry[30279]: ENGINE Caught signal SIGTERM.
Mar 26 18:18:04 apple ldapcherry[30280]: ENGINE Caught signal SIGTERM.
Mar 26 18:18:04 apple ldapcherry[30280]: ENGINE Bus STOPPING
Mar 26 18:18:04 apple ldapcherry[30279]: ENGINE Bus STOPPING
Mar 26 18:18:04 apple ldapcherry[30280]: ENGINE HTTP Server None already shut down
Mar 26 18:18:04 apple ldapcherry[30280]: ENGINE Bus STOPPED
Mar 26 18:18:04 apple ldapcherry[30279]: ENGINE HTTP Server None already shut down
Mar 26 18:18:04 apple ldapcherry[30280]: ENGINE Bus EXITING
Mar 26 18:18:04 apple ldapcherry[30279]: ENGINE Bus STOPPED
Mar 26 18:18:04 apple ldapcherry[30279]: ENGINE Bus EXITING
Mar 26 18:18:04 apple ldapcherry[30280]: ENGINE Bus EXITED
Mar 26 18:18:04 apple ldapcherry[30279]: ENGINE Bus EXITED
Mar 26 18:18:04 apple systemd[1]: ldapcherry.service: Service hold-off time over, scheduling restart.
Mar 26 18:18:04 apple systemd[1]: ldapcherry.service: Scheduled restart job, restart counter is at 5.
Mar 26 18:18:04 apple systemd[1]: Stopped ldapcherry.service.
Mar 26 18:18:04 apple systemd[1]: ldapcherry.service: Start request repeated too quickly.
Mar 26 18:18:04 apple systemd[1]: ldapcherry.service: Failed with result 'start-limit-hit'.
Mar 26 18:18:04 apple systemd[1]: Failed to start ldapcherry.service.

what is missed? how to handle it with systemd?

kakwa commented 5 years ago

Not sure what the issue is but I see several potential issues with this service file:

FYI, I've packaged ldapcherry for CentOS/RHEL (and also Debian), and here are the various systemd files I've used:

Just in case, the packages are available here: https://mirror.kakwalab.ovh/

mrPsycho commented 5 years ago

cool, thanks a lot)