-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathdestroy_seaside
executable file
·44 lines (34 loc) · 1.06 KB
/
destroy_seaside
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
#!/bin/bash
if [ $UID -ne 0 ]; then
echo "You must be root to run this!"
exit
fi
source config
source $GEMSTONE_CONFIG
echo "DANGER: This script destroys your current GemStone Seaside repository"
echo "and replaces it with a repository that does not yet include Seaside."
echo "Afterwards, you must either run installSeaside30, or load your own custom Seaside."
echo "Shall I continue? (Y/N)"
read cont
case "$cont" in
y|Y|yes)
;;
*)
echo "Not continuing"
exit
;;
esac
echo "Stopping GemStone ..."
/etc/init.d/topaz stop 1 > /dev/null
/etc/init.d/statmon stop 1 > /dev/null
/etc/init.d/gemstone stop 1 > /dev/null
/etc/init.d/netldi stop 1 > /dev/null
gslist -clv
rm -f $GEMSTONE_DATADIR/*.dbf $GEMSTONE_DATADIR/*.pid
echo "Copying $GEMSTONE/bin/extent0.seaside.dbf to $GEMSTONE_DATADIR/extent0.dbf"
cp $GEMSTONE/bin/extent0.seaside.dbf $GEMSTONE_DATADIR/extent0.dbf
chmod 660 $GEMSTONE_DATADIR/extent0.dbf
GS_OWNER="`ls -ld $GEMSTONE/seaside/bin | awk '{ print $3 ":" $4 }'`"
chown $GS_OWNER $GEMSTONE_DATADIR/extent0.dbf
# Success
exit 0