root/main/trunk/greenstone3/service.d/greenstone3.service.in @ 34322

Revision 34322, 0.9 KB (checked in by davidb, 2 months ago)

Changes after testing

Line 
1# For more details on writing a service, see:
2#  https://linuxconfig.org/how-to-create-systemd-service-unit-in-linux
3#
4[Unit]
5Description=Greenstone3 Digital Library Server
6After=network.target
7
8[Service]
9Type=forking
10User=www-data
11TimeoutStartSec=180
12TimeoutStopSec=240
13ExecStart=/usr/bin/env bash @GSDL3SRCHOME@/service.d/greenstone3-start.sh
14ExecStop=/usr/bin/env bash @GSDL3SRCHOME@/service.d/greenstone3-stop.sh
15
16#
17# If using 'Restart' directive, read the following to avoid some common pitfalls
18#   https://medium.com/@benmorel/creating-a-linux-service-with-systemd-611b5c8b91d6
19# Restart=on-failure
20#   Other restart options: always, on-abort, etc
21
22# The install section is needed to use `systemctl enable` to start on boot
23# For a user service that you want to enable and start automatically, use `default.target`
24# For system level services, use `multi-user.target`
25#
26[Install]
27WantedBy=multi-user.target
Note: See TracBrowser for help on using the browser.