-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathupdate_stable.sh
More file actions
54 lines (47 loc) · 1.44 KB
/
update_stable.sh
File metadata and controls
54 lines (47 loc) · 1.44 KB
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
#!/bin/bash
_UPD=1
# padding handles script being overwritten during updates
# see https://git.ispconfig.org/ispconfig/ispconfig3/issues/4227
##################################################
##################################################
##################################################
##################################################
##################################################
##################################################
##################################################
##################################################
##################################################
##################################################
##################################################
##################################################
{
if [ -n "${_UPD}" ]
then
{
umask 0077 \
&& tmpdir=`mktemp -dt "$(basename $0).XXXXXXXXXX"` \
&& test -d "${tmpdir}" \
&& cd "${tmpdir}"
} || {
echo 'mktemp failed'
exit 1
}
wget http://www.ispconfig.org/downloads/ISPConfig-3-stable.tar.gz
if [ -f ISPConfig-3-stable.tar.gz ]
then
tar xvfz ISPConfig-3-stable.tar.gz
cd ispconfig3_install/install/
php -q \
-d disable_classes= \
-d disable_functions= \
-d open_basedir= \
update.php
cd /tmp
rm -rf "${tmpdir}"
else
echo "Unable to download the update."
exit 1
fi
fi
exit 0
}