Subversion-Projekte lars-tiefland.php_share

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
1 lars 1
#!/usr/bin/php -q
2
<?php
3
 
4
// Make it possible to test in source directory
5
// This is for PEAR developers only
6
ini_set('include_path', ini_get('include_path').':..');
7
 
8
// Include Class
9
error_reporting(E_ALL);
10
 
11
// Start System Daemon (PEAR)
12
require_once "System/Daemon.php";
13
 
14
// Allowed arguments & their defaults
15
$runmode = array(
16
	"no-daemon" 	=> true,
17
	"help" 			=> false,
18
	"write-initd" 	=> false
19
);
20
 
21
// Options
22
$options = array(
23
	'appName' 				=> 'queue_test',
24
	'appDir' 				=> dirname(__FILE__),
25
	'sysMaxExecutionTime' 	=> '0',
26
	'sysMaxInputTime' 		=> '0',
27
	'sysMemoryLimit' 		=> '1024M'
28
);
29
System_Daemon::setOptions($options);
30
 
31
// Overrule the signal handler with any function
32
System_Daemon::setSigHandler(SIGCONT, array("System_Daemon", "defaultSigHandler"));
33
 
34
System_Daemon::start();
35
System_Daemon::restart();
36
System_Daemon::stop();