Sentora Support Forums
Help Development [/deploy/install.run] - Printable Version

+- Sentora Support Forums (https://senforums.mach-hosting.com)
+-- Forum: Sentora Forum Archives (https://senforums.mach-hosting.com/forumdisplay.php?fid=5)
+--- Forum: Sentora Public Support Forums v1.0.x (https://senforums.mach-hosting.com/forumdisplay.php?fid=32)
+---- Forum: General Support Forum v1.0.x (https://senforums.mach-hosting.com/forumdisplay.php?fid=36)
+---- Thread: Help Development [/deploy/install.run] (/showthread.php?tid=1096)



Help Development [/deploy/install.run] - Cantalupo - 02-20-2015

I am developing some modules ...

All is right with the module ...

The only problem was the /deploy/install.run

The install.run file should run my script, but at the time of module installation it does not run.

The php code in the install.run, there is no error.

Could anyone help?

Thank U! Smile


RE: Help Development [/deploy/install.run] - TGates - 02-20-2015

PHP Code:
<?php
// Function to Unzip
function UnZip(){
 
   global $controller;
 
   $zip = new ZipArchive;
 
   $res $zip->open('modules/'.$controller->GetControllerRequest('URL''module').'/apps/filename.zip');
 
   if ($res === TRUE) {
        
$zip->extractTo('etc/apps/chive');
        
$zip->close();
        return 
true;
     } else {
         return 
false;
 
   }
}

// Un-Compressing The ZIP Archive

if (UnZip() == 'true'){
 
   echo "Unzip was successful";
 
   // do something else?
    } else {
    echo "Unzip was not successful";
    // exit or retry?
}
?>

Ripped this out of Sentastico, untested for your use.


RE: Help Development [/deploy/install.run] - Cantalupo - 02-20-2015

Already created this part if the folder you created, do not perform the function.
Still, not executed during module installation, then, with the php extension work.

But I'll see if it will run at installation time, with these new rejustes.
Thank U!


RE: Help Development [/deploy/install.run] - Cantalupo - 02-20-2015

Does not work at installation time.
I will do otherwise.


RE: Help Development [/deploy/install.run] - TGates - 02-21-2015

Ok, well, hope you get it figured out Wink