FIXFILE now implemented
This commit is contained in:
parent
2a92283fe5
commit
13142812db
|
@ -90,7 +90,7 @@ if (file_exists($LOCK_FILE) !== false){
|
||||||
$params=unserialize($c["parameters"]);
|
$params=unserialize($c["parameters"]);
|
||||||
// We can resume these types of action, so we reset the job to process it later
|
// We can resume these types of action, so we reset the job to process it later
|
||||||
d("Previous job was the n°".$c["id"]." : '".$c["type"]."'");
|
d("Previous job was the n°".$c["id"]." : '".$c["type"]."'");
|
||||||
if($c["type"] == "CREATE_FILE" && is_dir(dirname($params["file"])) || $c["type"] == "CREATE_DIR" || $c["type"] == "DELETE" || $c["type"] == "FIXDIR"){
|
if($c["type"] == "CREATE_FILE" && is_dir(dirname($params["file"])) || $c["type"] == "CREATE_DIR" || $c["type"] == "DELETE" || $c["type"] == "FIXDIR" || $c["type"] == "FIXFILE"){
|
||||||
d("Reset of the job! So it will be resumed...");
|
d("Reset of the job! So it will be resumed...");
|
||||||
$action->reset_job($c["id"]);
|
$action->reset_job($c["id"]);
|
||||||
}else{
|
}else{
|
||||||
|
@ -157,6 +157,11 @@ while ($rr=$action->get_action()){
|
||||||
if($code!=0)
|
if($code!=0)
|
||||||
$output[0]="Fixperms.sh failed, returned error code : $code";
|
$output[0]="Fixperms.sh failed, returned error code : $code";
|
||||||
break;
|
break;
|
||||||
|
case "FIXFILE" :
|
||||||
|
@exec("$SU $FIXPERM -f ".$params["file"]." 2>&1", $trash, $code);
|
||||||
|
if($code!=0)
|
||||||
|
$output[0]="Fixperms.sh failed, returned error code : $code";
|
||||||
|
break;
|
||||||
default :
|
default :
|
||||||
$output=array("Fail: Sorry dude, i do not know this type of action");
|
$output=array("Fail: Sorry dude, i do not know this type of action");
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in New Issue