| 1 |
lars |
1 |
<?php
|
|
|
2 |
/* vim: set noai expandtab tabstop=4 softtabstop=4 shiftwidth=4: */
|
|
|
3 |
/**
|
|
|
4 |
* System_Daemon turns PHP-CLI scripts into daemons.
|
|
|
5 |
*
|
|
|
6 |
* PHP version 5
|
|
|
7 |
*
|
|
|
8 |
* @category System
|
|
|
9 |
* @package System_Daemon
|
|
|
10 |
* @author Kevin van Zonneveld <kevin@vanzonneveld.net>
|
|
|
11 |
* @copyright 2008 Kevin van Zonneveld (http://kevin.vanzonneveld.net)
|
|
|
12 |
* @license http://www.opensource.org/licenses/bsd-license.php New BSD Licence
|
|
|
13 |
* @version SVN: Release: $Id: Fedora.php 186 2010-05-10 13:10:04Z tiefland $
|
|
|
14 |
* @link http://trac.plutonia.nl/projects/system_daemon
|
|
|
15 |
*/
|
|
|
16 |
|
|
|
17 |
/**
|
|
|
18 |
* A System_Daemon_OS driver for Fedora based Operating Systems
|
|
|
19 |
*
|
|
|
20 |
* @category System
|
|
|
21 |
* @package System_Daemon
|
|
|
22 |
* @author Kevin van Zonneveld <kevin@vanzonneveld.net>
|
|
|
23 |
* @author Jukka Similä <jukka@datapolis.fi>
|
|
|
24 |
* @copyright 2008 Kevin van Zonneveld (http://kevin.vanzonneveld.net)
|
|
|
25 |
* @license http://www.opensource.org/licenses/bsd-license.php New BSD Licence
|
|
|
26 |
* @version SVN: Release: $Id: Fedora.php 186 2010-05-10 13:10:04Z tiefland $
|
|
|
27 |
* @link http://trac.plutonia.nl/projects/system_daemon
|
|
|
28 |
* *
|
|
|
29 |
*/
|
|
|
30 |
class System_Daemon_OS_Fedora extends System_Daemon_OS_RedHat
|
|
|
31 |
{
|
|
|
32 |
/**
|
|
|
33 |
* On Linux, a distro-specific version file is often telling us enough
|
|
|
34 |
*
|
|
|
35 |
* @var string
|
|
|
36 |
*/
|
|
|
37 |
protected $_osVersionFile = "/etc/fedora-release";
|
|
|
38 |
|
|
|
39 |
/**
|
|
|
40 |
* Path of init.d scripts
|
|
|
41 |
*
|
|
|
42 |
* @var string
|
|
|
43 |
*/
|
|
|
44 |
protected $_autoRunDir = '/etc/rc.d/init.d';
|
|
|
45 |
|
|
|
46 |
/**
|
|
|
47 |
* Template path
|
|
|
48 |
*
|
|
|
49 |
* @var string
|
|
|
50 |
*/
|
|
|
51 |
protected $_autoRunTemplatePath = '#datadir#/template_Fedora';
|
|
|
52 |
|
|
|
53 |
/**
|
|
|
54 |
* Replace the following keys with values to convert a template into
|
|
|
55 |
* a read autorun script
|
|
|
56 |
*
|
|
|
57 |
* @var array
|
|
|
58 |
*/
|
|
|
59 |
protected $_autoRunTemplateReplace = array(
|
|
|
60 |
"@author_name@" => "{PROPERTIES.authorName}",
|
|
|
61 |
"@author_email@" => "{PROPERTIES.authorEmail}",
|
|
|
62 |
'@name@' => '{PROPERTIES.appName}',
|
|
|
63 |
'@desc@' => '{PROPERTIES.appDescription}',
|
|
|
64 |
'@bin_file@' => '{PROPERTIES.appDir}/{PROPERTIES.appExecutable}',
|
|
|
65 |
'@bin_name@' => '{PROPERTIES.appExecutable}',
|
|
|
66 |
'@pid_file@' => '{PROPERTIES.appPidLocation}',
|
|
|
67 |
'@chkconfig@' => '{PROPERTIES.appChkConfig}',
|
|
|
68 |
);
|
|
|
69 |
|
|
|
70 |
}
|