-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathinstall.sh
executable file
·51 lines (40 loc) · 1.81 KB
/
install.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
echo set source and target:
helpdesk=/data/helpdesk
WEBGUI=/data/WebGUI
echo source: $helpdesk
echo target: $WEBGUI
# this ran OK ok centos 5
# it requires wgd for the database part and package part
# copy files into the WebGUI area
# note: it may be desirable to create links rather than copy
cd $helpdesk
echo cd to `pwd`
echo remove existing helpdesk files
# these commands can be used to un-install the modules & extras for helpdesk
# remember to incldue the assignments above
find sbin/ -type f | xargs -I{} rm -f $WEBGUI/{}
find www/ -type f | xargs -I{} rm -f $WEBGUI/{}
find lib/ -type f | xargs -I{} rm -f $WEBGUI/{}
find t/ -type f | xargs -I{} rm -f $WEBGUI/{}
# these commands can be used to diff the modules & extras for helpdesk
# remember to incldue the assignments above
# find sbin/ -type f | xargs -I{} diff -u $helpdesk/{} $WEBGUI/{}
# find www/ -type f | xargs -I{} diff -u $helpdesk/{} $WEBGUI/{}
# find lib/ -type f | xargs -I{} diff -u $helpdesk/{} $WEBGUI/{}
# find t/ -type f | xargs -I{} diff -u $helpdesk/{} $WEBGUI/{}
echo link new helpdsk files into WebGUI directory
find sbin/ -type f | xargs -I{} ln -s $helpdesk/{} $WEBGUI/{}
find www/ -type d | xargs -I{} mkdir $WEBGUI/{} 2> /dev/null
find www/ -type f | xargs -I{} ln -s $helpdesk/{} $WEBGUI/{}
find lib/ -type f | xargs -I{} ln -s $helpdesk/{} $WEBGUI/{}
find t/ -type f | xargs -I{} ln -s $helpdesk/{} $WEBGUI/{}
# note that it is necessary to re-create the hard links any time you update the git repo...
## be sure to edit the config file:
cd $WEBGUI/sbin
echo cd to `pwd`
echo run helpdesk install
perl $helpdesk/sbin/installHelpDesk.pl --configFile localhost.conf
echo create database
wgd -F $WEBGUI/etc/localhost.conf db < $helpdesk/docs/helpdesk.sql
echo install package
wgd -F $WEBGUI/etc/localhost.conf package --import $helpdesk/docs/help_desk.wgpkg