forked from cpausmit/IntelROCCS
-
Notifications
You must be signed in to change notification settings - Fork 0
/
installDetox.sh
executable file
·62 lines (48 loc) · 1.73 KB
/
installDetox.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/Detox. 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.
#
# Ch.Paus: Version 0.0 (Mar 09, 2014)
# --------------------------------------------------------------------------------------------------
# Configuration parameters (this needs more work but for now)
export INTELROCCS_USER=cmsprod
export INTELROCCS_GROUP=zh
source Detox/setupDetox.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 $DETOX_BASE`
# copy the software
#==================
if [ -d "$DETOX_BASE" ]
then
# make sure to remove completely the previous installed software
echo " Removing previous installation."
rm -rf "$DETOX_BASE"
fi
cp -r ../IntelROCCS/Detox $TRUNC
# create log/db structure
#========================
# owner has to be $INTELROCCS_USER:$INTELROCCS_GROUP, this user runs the process
mkdir -p $DETOX_DB
chown ${INTELROCCS_USER}:${INTELROCCS_GROUP} -R $DETOX_DB
# install and start daemons
#==========================
# stop potentially existing server process
if [ -e "/etc/init.d/detoxd" ]
then
/etc/init.d/detoxd status
/etc/init.d/detoxd stop
fi
# copy Detox daemon
cp /usr/local/IntelROCCS/Detox/sysv/detoxd /etc/init.d/
# start new server
/etc/init.d/detoxd status
/etc/init.d/detoxd start
sleep 2
/etc/init.d/detoxd status
# start on boot
chkconfig --level 345 detoxd on
exit 0