tbrehm
2013-08-27 682b4a5d70c4554de446b27a6d43fdea5c140bbb
Updated patch script.
1 files renamed
1 files deleted
19 ■■■■ changed files
server/scripts/ispconfig_patch 16 ●●●●● patch | view | raw | blame | history
server/scripts/ispconfig_patch.sh 3 ●●●●● patch | view | raw | blame | history
server/scripts/ispconfig_patch
File was renamed from server/scripts/ispconfig_patch.php
@@ -1,3 +1,4 @@
#!/usr/bin/php
<?php
/*
@@ -77,6 +78,15 @@
        return $answer;
}
function is_installed($appname) {
    exec('which '.escapeshellcmd($appname).' 2> /dev/null',$out,$returncode);
    if(isset($out[0]) && stristr($out[0],$appname) && $returncode == 0) {
        return true;
    } else {
        return false;
    }
}
echo "\n\n".str_repeat('-',80)."\n";
echo " _____ ___________   _____              __ _       
|_   _/  ___| ___ \ /  __ \            / _(_)      
@@ -90,11 +100,15 @@
echo "\n\n>> Patch tool  \n\n";
echo "Please enter the patch id that you want to be applied to your ISPConfig installation.\nPlease be aware that we take NO responsibility that this will work for you.\nOnly use patches if you know what you are doing.\n\n";
if(!is_installed('patch')) {
    swriteln("The program 'patch' is missing on your server. Please install it and try again.");
}
$patch_id = simple_query('Enter patch id', false, '');
if($patch_id == '') {
    swriteln("Patch terminated by user.\n");
    die();
} elseif(preg_match('/^[a-zA-Z0-9_\-\.]+$/', $patch_id) == false) {
} elseif(preg_match('/^[a-zA-Z0-9_\-]+$/', $patch_id) == false) {
    swriteln("Invalid patch id.\n");
    die();
}
server/scripts/ispconfig_patch.sh
File was deleted