Last change
on this file since 34673 was 34673, checked in by davidb, 3 years ago |
Paramaterized the username to use
|
-
Property svn:executable
set to
*
|
File size:
1.2 KB
|
Line | |
---|
1 | #!/bin/bash
|
---|
2 |
|
---|
3 | if [ -d "/etc/systemd/system/" ] ; then
|
---|
4 |
|
---|
5 | if [ "x$GSDL3SRCHOME" = "x" ] ; then
|
---|
6 | cd .. && source ./gs3-setup.sh && cd service.d
|
---|
7 | fi
|
---|
8 |
|
---|
9 | gsdl_service_username=${1-www-data}
|
---|
10 | echo ""
|
---|
11 |
|
---|
12 | echo "****"
|
---|
13 | echo "* Generating greenstone3.service from greenstone3.service.in"
|
---|
14 | echo "****"
|
---|
15 | cat greenstone3.service.in \
|
---|
16 | | sed "s%@GSDL3SRCHOME@%$GSDL3SRCHOME%g" \
|
---|
17 | | sed "s%@GSDL_SERVICE_USERNAME@%$gsdl_service_username%g" \
|
---|
18 | > greenstone3.service
|
---|
19 |
|
---|
20 | echo "****"
|
---|
21 | echo "* Copying greenstone3.service to /etc/systemd/system/"
|
---|
22 | echo "****"
|
---|
23 | sudo /bin/cp greenstone3.service /etc/systemd/system/.
|
---|
24 |
|
---|
25 | echo ""
|
---|
26 | echo "----"
|
---|
27 | echo "General info:"
|
---|
28 | echo " In the event of the service being updated, you will most likely need to run:"
|
---|
29 | echo " sudo systemctl daemon-reload"
|
---|
30 | echo ""
|
---|
31 | echo " To enable this service to be run at boot-up time, run:"
|
---|
32 | echo " sudo systemctl enable greenstone3"
|
---|
33 | echo "----"
|
---|
34 |
|
---|
35 | else
|
---|
36 | echo "Error: Failed to find '/etc/systemd/system'" >&2
|
---|
37 | echo "This install script was developed on a Debian system." >&2
|
---|
38 | echo "It looks like your Linux Distribution uses a different directory structure for services" >&2
|
---|
39 |
|
---|
40 | exit 1
|
---|
41 | fi
|
---|
42 |
|
---|
Note:
See
TracBrowser
for help on using the repository browser.