-
Notifications
You must be signed in to change notification settings - Fork 0
/
uncompress_cgi.sh
141 lines (77 loc) · 1.7 KB
/
uncompress_cgi.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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
#!/bin/sh
progname=`basename $0`
if [ $# -ne 1 ] ; then
echo "
Usage: $progname <file>
<file> = dada Mail tar ball
Example: $progname dada-6_8_1.tar.gz
NOTE: This script is a shell script version of the uncpmpress_dada.cgi script. It takes one arguent which is the name of the dadaMail tar file. The purpose of this script is to allow sysadmins to run installation on the command line.
"
exit
fi
exit
BASIC=$1;export BASIC
if [ -d 'dada' ] ; then
echo "
Yikes! A directory name 'dada' already exists in this location! Please manually move this directory, before running this script
"
exit
fi
echo "
Starting Adventure...
Uncompressing $BASIC
"
tar xvzf $BASIC
if [ ! -d 'dada' ]; then
gunzip $BASIC
$BASIC =~ s/\.gz$//
if [ ! -f $BASIC ] ; then
echo "
Can't find $BASIC to uncompress!
You may have to uncompress and prep Dada Mail manually
"
else
echo "
Success!
Unrolling $BASIC
"
tar xvf $BASIC
fi
else
echo "
Success!
"
fi
echo "
Checking to see if 'dada' directory now exists...
"
if [ ! -d 'dada' ] ; then
echo "
Can't find 'dada' directory!
"
exit;
else
echo "
Success!
Changing permissions of dada/mail.cgi to 755
"
fi
chmod 755 dada
chmod 755 dada/DADA
chmod 755 dada/mail.cgi
chmod 777 dada/DADA/Config.pm
installer_loc=dada/installer-disabled
new_installer_loc=dada/installer
echo "
Enabling installer at $installer_loc by moving it to $new_installer_loc
"
mv $installer_loc $new_installer_loc
chmod 755 $new_installer_loc
chmod 755 $new_installer_loc/install.cgi
echo "
Done!
"
echo "
Install and Configure Dada Mail by running the following:
./$new_installer_loc/install.cgi
"