Hi euler,
Am 02.07.24 um 04:11 schrieb euler:
> Dear Tim,
>
> About this, if for example, I am going to use the embedded Tomcat in a
> production server, what would you suggest as the best practice for
> starting the server-boot.jar automatically? Should it be run via crontab
> at reboot? Or as a service? Can you point us to some examples of how to
> start the embedded tomcat upon reboot?
since nobody stepped ahead… here is a _very basic_ unit for systemd, it
does not check for errors.
Its was just a quick test, feel free to extend and upgrade. No warranty,
so. Adjust the ReadWritePaths to your needs.
---------------
[Unit]
Description=DSpace 8 Backend Service
After=syslog.target network.target solr.service
Before=httpd.service
[Service]
User=tomcat
Group=tomcat
PrivateTmp=yes
NoNewPrivileges=true
ProtectSystem=strict
ReadWritePaths=/var/lib/dspace
ReadWritePaths=/home/dspace
LimitNOFILE=102642
ExecStart=/usr/bin/java -jar /home/dspace/webapps/server-boot.jar
StandardOutput=null
[Install]
WantedBy=multi-user.target
---------------
Michael