forked from cpausmit/IntelROCCS
-
Notifications
You must be signed in to change notification settings - Fork 0
/
installUndertaker.sh
executable file
·62 lines (48 loc) · 1.81 KB
/
installUndertaker.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
#!/bin/bash
# --------------------------------------------------------------------------------------------------
#
# Installation script for IntelROCCS/Undertaker. There will be lots of things to test and to fix, but
# this is the starting point. This installation has to be performed as user root.
#
# M. Goncharov: Version 0.0 (Oct 14, 2014)
# --------------------------------------------------------------------------------------------------
# Configuration parameters (this needs more work but for now)
export INTELROCCS_USER=cmsprod
export INTELROCCS_GROUP=zh
source Undertaker/setupUndertaker.sh
# make sure mysql is setup properly for server and clients otherwise this will not work check out
# the README
# General installation (you have to be in the directory of install script and you have to be root)
TRUNC=`dirname $UNDERTAKER_BASE`
# copy the software
#==================
if [ -d "$UNDERTAKER_BASE" ]
then
# make sure to remove completely the previous installed software
echo " Removing previous installation."
rm -rf "$UNDERTAKER_BASE"
fi
cp -r ../IntelROCCS/Undertaker $TRUNC
# create log/db structure
#========================
# owner has to be $INTELROCCS_USER:$INTELROCCS_GROUP, this user runs the process
mkdir -p $UNDERTAKER_DB
chown ${INTELROCCS_USER}:${INTELROCCS_GROUP} -R $UNDERTAKER_DB
# install and start daemons
#==========================
# stop potentially existing server process
if [ -e "/etc/init.d/caretakerd" ]
then
/etc/init.d/undertakerd status
/etc/init.d/undertakerd stop
fi
# copy Detox daemon
cp /usr/local/IntelROCCS/Undertaker/sysv/undertakerd /etc/init.d/
# start new server
/etc/init.d/undertakerd status
/etc/init.d/undertakerd start
sleep 2
/etc/init.d/undertakerd status
# start on boot
chkconfig --level 345 undertakerd on
exit 0