Last change
on this file since 34324 was 34324, checked in by davidb, 4 years ago |
Updated to include info about making this a boot-up service
|
-
Property svn:executable
set to
*
|
File size:
1.1 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 | echo ""
|
---|
10 |
|
---|
11 | echo "****"
|
---|
12 | echo "* Generating greenstone3.service from greenstone3.service.in"
|
---|
13 | echo "****"
|
---|
14 | cat greenstone3.service.in | sed "s%@GSDL3SRCHOME@%$GSDL3SRCHOME%g" > greenstone3.service
|
---|
15 |
|
---|
16 | echo "****"
|
---|
17 | echo "* Copying greenstone3.service to /etc/systemd/system/"
|
---|
18 | echo "****"
|
---|
19 | sudo /bin/cp greenstone3.service /etc/systemd/system/.
|
---|
20 |
|
---|
21 | echo ""
|
---|
22 | echo "----"
|
---|
23 | echo "General info:"
|
---|
24 | echo " In the event of the service being updated, you will most likely need to run:"
|
---|
25 | echo " sudo systemctl daemon-reload"
|
---|
26 | echo ""
|
---|
27 | echo " To enable this service to be run at boot-up time, run:"
|
---|
28 | echo " sudo systemctl enable greenstone3"
|
---|
29 | echo "----"
|
---|
30 |
|
---|
31 | else
|
---|
32 | echo "Error: Failed to find '/etc/systemd/system'" >&2
|
---|
33 | echo "This install script was developed on a Debian system." >&2
|
---|
34 | echo "It looks like your Linux Distribution uses a different directory structure for services" >&2
|
---|
35 |
|
---|
36 | exit 1
|
---|
37 | fi
|
---|
38 |
|
---|
Note:
See
TracBrowser
for help on using the repository browser.