systemd auto start and stop

Scott <[email protected]>
Newsgroups gmane.comp.jakarta.james.user
Message-ID <[email protected]>
Does anyone have a working james.service systemd file that will run correctly on Ubuntu 20.04 with the new Apache James 3.6?

I tried both configurations in this thread with failed results:  http://mail-archives.apache.org/mod_mbox/james-server-user/201901.mbox/%[email protected]%3E

The journalctl log message just said "Exit code" with either of those configurations. This was the last one I tried before I gave up:

[Unit]
Description=Apache James 3.6 Mail Server
After=network.target
[Service]
Type=forking
Environment="JAVA_HOME=/usr/local/java"
WorkingDirectory=/usr/local/james/bin 
ExecStart=/usr/local/james/bin/james start
ExecStop=/usr/local/james/bin/james stop
RestartSec=10
Restart=always
[Install]
WantedBy=multi-user.target


What would happen when I would run "systemctl start james" was that it would start, run for 10-15 seconds, and then stop.

For those running James in a prod environment, what are you doing to auto-start and stop it on system reboots?

Scott
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.