root/main/trunk/greenstone3/service.d/INSTALL-SERVICE.sh @ 34322

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

Changes after testing

  • Property svn:executable set to *
Line 
1#!/bin/bash
2
3if [ -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    #    if [ ! -f greenstone3-service.sh ] ; then
10        echo "****"
11    echo "* Generating greenstone3.service from greenstone3.service.in"
12    echo "****"
13    cat greenstone3.service.in | sed "s%@GSDL3SRCHOME@%$GSDL3SRCHOME%g" > greenstone3.service
14#    fi
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 "In the event of the service being updated, you will most likely need to run:"
23    echo "  sudo systemctl daemon-reload"
24    echo "----"
25   
26else
27    echo "Error: Failed to find '/etc/systemd/system'" >&2
28    echo "This install script was developed on a Debian system." >&2
29    echo "It looks like your Linux Distribution uses a different directory structure for services" >&2
30
31    exit 1
32fi 
33
Note: See TracBrowser for help on using the browser.