I just can’t seem to figure out how to get RHEL7/CENTOS7 to not kill my Domino Server with a reboot command. I have successfully crafted a working systemd file that correctly starts the server on boot and allows me to gracefully shutdown or restart the server with systemctl:
ExecStop=/usr/bin/su - notes -c ‘echo Y | /opt/ibm/domino/bin/server -jc -q’
[Install]
WantedBy=multi-user.target graphical.target
However, if the server needs to be shut down, or rebooted, I need to remember to shut down the service manually with
systemctl stop domino
Otherwise, the databases need recovery when they start back up.
I have tried a couple of suggestions I have found on the web:
create a shutdown script that is wanted by the shutdown.target
copy systemd-halt.service, systemd-poweroff.service, systemd-shutdown.service, and systemd-reboot.service over to /etc/systemd/system and add a ExecStartPre= line to shut down the service
I don’t know what to do next, except ask if there is something simple that I’ve missed as a newbie to systemd.
For some reason, I can’t edit or comment on your article…
With systemd, you don’t need ANY startup script.
The use of these scripts were actually the CAUSE of your shutdown issues.
Instead of forcing the use of old initd scripts into systemd, just let systemd start Domino server, and do nothing else.
See also jdebp.euhttps://jdebp.eu/FGA/systemd-house-of-horror/…
Here’s what my own domino.service file looks like:
[Unit]
Description=“IBM Domino Server”
Documentation=IBM Support
After=network.target
no exotic systemd feature involved (KillMode/RemainAfterExit)
no dependancy on any 3rd party startup script
systemd gains full visibility over Domino tasks (see “systemctl status domino”)
NB : If you don’t want to use the Java console, you can probably use (untested):
ExecStart=/bin/sh /opt/ibm/lotus/bin/server
ExecStop=/bin/sh /opt/ibm/lotus/bin/server -q
Thanks, Joe. I’ve been using those Daniel Nashed’s scripts for years and I agree. Very good stuff. The root issue in this case was, however, that in RHEL 7, unless you are very careful, systemd will kill Domino on OS shutdown instead of shutting it down properly according to the script.
This is the case whether you install it with chkconfig or call it from one of the new-fangled service files in systemd.
Through painstaking trial and error, I’ve stumbled upon the correct combination of directives in the systemd service file. A systemd guru could probably improve upon this, but the basic, everyday functionality is there, and most importantly, the databases will not crash and have to go through recovery when Domino starts back up again. “domino_script” comes from the Nashcom http://www.nashcom.de/nshweb/pages/startscript.htm website you mentioned earlier, but the real magic in a RHEL 7 scenario are the directives, “KillMode=process” and “RemainAfterExit=yes”:
[Unit]
Description=IBM Domino Server
Documentation=IBM Support
After=syslog.target network.target