Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Jozef Sroka
ISPConfig 3
Commits
2b77ca2d
Commit
2b77ca2d
authored
Oct 05, 2016
by
Till Brehm
Browse files
Merge branch '4227' into 'stable-3.1'
handle bash script overwrites during update. fixes #4227 See merge request !461
parents
7d6dfc5f
269b2cef
Changes
2
Hide whitespace changes
Inline
Side-by-side
server/scripts/ispconfig_update.sh
View file @
2b77ca2d
#!/bin/bash
php
-q
\
-d
disable_classes
=
\
-d
disable_functions
=
\
-d
open_basedir
=
\
/usr/local/ispconfig/server/scripts/ispconfig_update.php
_UPD
=
1
##################################################
##################################################
##################################################
##################################################
##################################################
##################################################
# padding handles script being overwritten during updates
# see https://git.ispconfig.org/ispconfig/ispconfig3/issues/4227
{
if
[
-n
"
${
_UPD
}
"
]
then
exec
php
-q
\
-d
disable_classes
=
\
-d
disable_functions
=
\
-d
open_basedir
=
\
/usr/local/ispconfig/server/scripts/ispconfig_update.php
fi
}
server/scripts/update_stable.sh
View file @
2b77ca2d
#!/bin/bash
{
{
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
]
_UPD
=
1
# padding handles script being overwritten during updates
# see https://git.ispconfig.org/ispconfig/ispconfig3/issues/4227
##################################################
##################################################
##################################################
##################################################
##################################################
##################################################
##################################################
##################################################
##################################################
##################################################
##################################################
##################################################
{
if
[
-n
"
${
_UPD
}
"
]
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
{
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
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment