Skip to content
Snippets Groups Projects
Commit 6878585a authored by hahn's avatar hahn
Browse files

ci server - sync-Packages cronjob runs as www-data - no sudo required --> remove runas

parent 3f3e1027
Branches
No related tags found
No related merge requests found
......@@ -9,6 +9,10 @@
// http://iml:deployment@ci.iml.unibe.ch/deployment/?prj=ci&action=deploy&par3=preview&confirm=1
$sDocroot = (dirname(__dir__)) . "/public_html";
$processUser = posix_getpwuid(posix_geteuid());
if ($processUser['name']=="root"){
die("Do not start the script as user root\n");
};
require_once("$sDocroot/deployment/classes/logger.class.php");
global $oCLog;
......
......@@ -9,6 +9,10 @@
require_once(dirname(__DIR__)."/config/inc_projects_config.php");
echo "\n========= SYNC archive files ==========\n";
$processUser = posix_getpwuid(posix_geteuid());
if ($processUser['name']=="root"){
die("Do not start the script as user root\n");
};
if (array_key_exists('mirrorPackages', $aConfig) && count($aConfig['mirrorPackages']) ){
foreach (array_keys($aConfig["phases"]) as $sPhase){
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment