mirror of
https://github.com/HaschekSolutions/pictshare.git
synced 2025-11-16 21:18:00 +00:00
allow skipping of phase 1
This commit is contained in:
@@ -43,13 +43,14 @@ if(defined('ENCRYPTION_KEY') && ENCRYPTION_KEY)
|
|||||||
echo "[i] Encryption key found. Will encrypt on Storage controllers\n";
|
echo "[i] Encryption key found. Will encrypt on Storage controllers\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(!in_array('p2',$argv))
|
||||||
echo "[i] PHASE 1\n";
|
|
||||||
echo " [P1] Files from Storage controllers will be downloaded if they don't exist localy\n";
|
|
||||||
sleep(1);
|
|
||||||
|
|
||||||
foreach($controllers as $contr)
|
|
||||||
{
|
{
|
||||||
|
echo "[i] PHASE 1\n";
|
||||||
|
echo " [P1] Files from Storage controllers will be downloaded if they don't exist localy\n";
|
||||||
|
sleep(1);
|
||||||
|
|
||||||
|
foreach($controllers as $contr)
|
||||||
|
{
|
||||||
echo " [P1] Collecting list of items from ".get_class($contr)."..";
|
echo " [P1] Collecting list of items from ".get_class($contr)."..";
|
||||||
$controllerfiles = $contr->getItems(true);
|
$controllerfiles = $contr->getItems(true);
|
||||||
echo " done. Got ".count($controllerfiles)." files\n";
|
echo " done. Got ".count($controllerfiles)." files\n";
|
||||||
@@ -81,11 +82,12 @@ foreach($controllers as $contr)
|
|||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
echo "\n ----------- END OF PHASE 1 -----------\n\n";
|
||||||
}
|
}
|
||||||
|
else echo "[i] Skipping Phase 1\n";
|
||||||
|
|
||||||
echo "\n ----------- END OF PHASE 1 -----------\n\n";
|
|
||||||
|
|
||||||
|
|
||||||
echo "[i] PHASE 2\n";
|
echo "[i] PHASE 2\n";
|
||||||
echo " [P2] Local files are synced to all storage controllers\n";
|
echo " [P2] Local files are synced to all storage controllers\n";
|
||||||
|
|||||||
Reference in New Issue
Block a user