diff options
author | Eudyptula <eitan@mosenkis.net> | 2009-06-29 18:00:44 -0400 |
---|---|---|
committer | Eudyptula <eitan@mosenkis.net> | 2009-06-29 18:00:44 -0400 |
commit | d0172b464174f6ebc17a93f84e901618dd648adc (patch) | |
tree | 8e64402243d5b9a2e9dd8564dc1fcfba0fa8fb25 /backend/backend.php | |
parent | Added an send invitations form to frontend and email notifications to backend (diff) | |
download | ingenue-d0172b464174f6ebc17a93f84e901618dd648adc.tar.gz ingenue-d0172b464174f6ebc17a93f84e901618dd648adc.tar.bz2 ingenue-d0172b464174f6ebc17a93f84e901618dd648adc.zip |
Added image format option to frontend, tbz2 and preliminary Install CD and LiveCD support to backend
Diffstat (limited to 'backend/backend.php')
-rwxr-xr-x | backend/backend.php | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/backend/backend.php b/backend/backend.php index 3cd0f07..4e2209a 100755 --- a/backend/backend.php +++ b/backend/backend.php @@ -25,10 +25,12 @@ if (isset($opts['k'])) { if (!posix_kill($pid, SIGTERM)) { debug("Failed to send SIGTERM to $pid"); die(1); + } else { + // TODO wait for $pid to exit } } else { debug("Couldn't send signal 0 to $pid"); - die(1); + die(0); } } else { debug('No PID file found'); @@ -54,9 +56,9 @@ while (true) { $build->status='build/running'; $build->write(); log_msg('Starting build id='.$build->id); - $image=null; + $success=null; try { - $image=build($build); + $success=build($build); } catch (Exception $e) { log_msg('Caught exception: '.$e->getMessage()); $build->status='finished/failed: '.$e->getMessage(); @@ -65,8 +67,8 @@ while (true) { } $build->finish=time(); log_msg('Finished with build id='.$build->id); - if (isset($image)) { - log_msg("Completed image at $image"); + if (isset($success)) { + log_msg("Completed build successfully"); $build->status='finished/success'; xhtmlemail('"'.$owner->name.'" <'.$owner->email.'>', null, $conf['title'].' build finished', 'Your build has completed successfully. You can find more information and download the completed image at <a href="'.url('logs/'.$build->id).'">'.url('logs/'.$build->id).'</a>'); } |