[fix] replace "sh" by "bash" for force shell interpreter
[fix] dir "/cache/cronTask/" not create in not existe
This commit is contained in:
parent
3eaea010ce
commit
04a2abeb97
2 changed files with 9 additions and 3 deletions
|
@ -7,7 +7,7 @@ do
|
||||||
then
|
then
|
||||||
while read site hashUrl thumbSize sizeNameDir onlyThumb
|
while read site hashUrl thumbSize sizeNameDir onlyThumb
|
||||||
do
|
do
|
||||||
sh thumb_server.sh "$site" "$hashUrl" "$thumbSize" "$sizeNameDir" "$onlyThumb" "0"
|
bash thumb_server.sh "$site" "$hashUrl" "$thumbSize" "$sizeNameDir" "$onlyThumb" "0"
|
||||||
rm $file
|
rm $file
|
||||||
done < $file
|
done < $file
|
||||||
fi
|
fi
|
||||||
|
|
10
index.php
10
index.php
|
@ -147,9 +147,9 @@ function launchScript($url, $hashUrl, $width, $size, $onlyThumb, $waitForResult
|
||||||
if ($GLOBALS['config']['disableExec'] === false) {
|
if ($GLOBALS['config']['disableExec'] === false) {
|
||||||
chdir('bin/');
|
chdir('bin/');
|
||||||
if ($waitForResult === false) {
|
if ($waitForResult === false) {
|
||||||
exec('sh thumb_server.sh '.$url.' '.$hashUrl.' '.$width.' '.$size.' '.$onlyThumb.' > /dev/null &', $result);
|
exec('bash thumb_server.sh '.$url.' '.$hashUrl.' '.$width.' '.$size.' '.$onlyThumb.' > /dev/null &', $result);
|
||||||
} else {
|
} else {
|
||||||
exec('sh thumb_server.sh '.$url.' '.$hashUrl.' '.$width.' '.$size.' '.$onlyThumb.' 1', $result);
|
exec('bash thumb_server.sh '.$url.' '.$hashUrl.' '.$width.' '.$size.' '.$onlyThumb.' 1', $result);
|
||||||
}
|
}
|
||||||
chdir('../');
|
chdir('../');
|
||||||
} else {
|
} else {
|
||||||
|
@ -257,6 +257,9 @@ function install() {
|
||||||
if (!is_dir('cache/tmp') && !mkdir('cache/tmp', 0705)) {
|
if (!is_dir('cache/tmp') && !mkdir('cache/tmp', 0705)) {
|
||||||
die('Error on create dir "cache/tmp".');
|
die('Error on create dir "cache/tmp".');
|
||||||
}
|
}
|
||||||
|
if (!is_dir('cache/cronTask') && !mkdir('cache/cronTask', 0705)) {
|
||||||
|
die('Error on create dir "cache/cronTask".');
|
||||||
|
}
|
||||||
$salt = sha1(uniqid(rand(), true).'_'.mt_rand());
|
$salt = sha1(uniqid(rand(), true).'_'.mt_rand());
|
||||||
$serverKey = substr(sha1(uniqid(rand(), true).'_'.mt_rand().$salt), 0, 12);
|
$serverKey = substr(sha1(uniqid(rand(), true).'_'.mt_rand().$salt), 0, 12);
|
||||||
$encryptServerKey = sha1($serverKey.$salt);
|
$encryptServerKey = sha1($serverKey.$salt);
|
||||||
|
@ -292,6 +295,9 @@ function checkInstall() {
|
||||||
if (!is_file('cache/config/.htaccess')) {
|
if (!is_file('cache/config/.htaccess')) {
|
||||||
file_put_contents('cache/config/.htaccess', "Allow from none\nDeny from all\n");
|
file_put_contents('cache/config/.htaccess', "Allow from none\nDeny from all\n");
|
||||||
}
|
}
|
||||||
|
if (!is_file('cache/cronTask/.htaccess')) {
|
||||||
|
file_put_contents('cache/config/.htaccess', "Allow from none\nDeny from all\n");
|
||||||
|
}
|
||||||
if (!is_file('bin/.htaccess')) {
|
if (!is_file('bin/.htaccess')) {
|
||||||
file_put_contents('bin/.htaccess', "Allow from none\nDeny from all\n");
|
file_put_contents('bin/.htaccess', "Allow from none\nDeny from all\n");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue