");
						echo(file_get_contents("/tmp/jcreate_".$_name));
						echo("
"); } else { header('Location: /pkg.php?xml=jailctl.xml'); } flush(); exit; case 'start': # if($jstate!='Stopped') break; exec('umount -f '.$_path.'/dev'); if($_template) { $jail['juse_unionfs']=='on' ? $mount=$mount_unionfs : $mount=$mount_nullfs ; foreach($mounts as $mp) { exec($mount.' '.$_template.'/'.$mp.' '.$_path.'/'.$mp, $_cmd); } foreach($unionmounts as $mp) { exec($mount_unionfs.' '.$_template.'/'.$mp.' '.$_path.'/'.$mp, $_cmd); } } $cmd='jailctl start '.$_name; exec($cmd, $_cmd); if($jconfig['debug']) { echo(""); } else { header('Location: /pkg.php?xml=jailctl.xml'); } flush(); exit; case 'stop': # if($jstate!='Running') break; $cmd='jailctl stop '.$_name; exec($cmd, $_cmd); if($_template) { foreach($mounts as $mp) { exec('umount -f '.$_template.'/'.$mp.' '.$_path.'/'.$mp, $_cmd); } foreach($unionmounts as $mp) { exec('umount -f '.$_template.'/'.$mp.' '.$_path.'/'.$mp, $_cmd); } } exec('umount -f '.$_path.'/dev'); if($jconfig['debug']) { echo(""); } else { header('Location: /pkg.php?xml=jailctl.xml'); } flush(); exit; } } $config['installedpackages']['pfjailctl']['config'][$i]['jstate']=$jstatus['jstate']; $config['installedpackages']['pfjailctl']['config'][$i]['jpath']=$jstatus['jpath']; $config['installedpackages']['pfjailctl']['config'][$i]['jifdesc']= $jstatus['jifdesc']." (".$jstatus['jrealif'].")"; $jactions=Array(); switch ($jstatus['jstate']) { case 'Building': $jactions[]=""; break; case 'New': $jactions[]="Create"; break; case 'Stopped': $jactions[]="Start"; #$jactions[]="Upgrade"; break; case 'Running': $jactions[]="Stop"; break; } $config['installedpackages']['pfjailctl']['config'][$i]['jactions']=implode(' | ', $jactions); } } ?>