Last change
on this file since 36909 was 34673, checked in by davidb, 3 years ago |
Paramaterized the username to use
|
File size:
929 bytes
|
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]
|
---|
5 | Description=Greenstone3 Digital Library Server
|
---|
6 | After=network.target
|
---|
7 |
|
---|
8 | [Service]
|
---|
9 | Type=forking
|
---|
10 | User=@GSDL_SERVICE_USERNAME@
|
---|
11 | TimeoutStartSec=180
|
---|
12 | TimeoutStopSec=240
|
---|
13 | ExecStart=/usr/bin/env bash @GSDL3SRCHOME@/service.d/greenstone3-start.sh
|
---|
14 | ExecStop=/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]
|
---|
27 | WantedBy=multi-user.target
|
---|
Note:
See
TracBrowser
for help on using the repository browser.