home *** CD-ROM | disk | FTP | other *** search
/ Cricao de Sites - 650 Layouts Prontos / WebMasters.iso / Servidores / xampp-win32-1.6.7-installer.exe / php / PEAR / System / Daemon / OS / Debian.php < prev    next >
Encoding:
PHP Script  |  2008-07-02  |  2.1 KB  |  66 lines

  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$
  14.  * @link      http://trac.plutonia.nl/projects/system_daemon
  15.  */
  16.  
  17. /**
  18.  * A System_Daemon_OS driver for Debian based Operating Systems (including Ubuntu)
  19.  *
  20.  * @category  System
  21.  * @package   System_Daemon
  22.  * @author    Kevin van Zonneveld <kevin@vanzonneveld.net>
  23.  * @copyright 2008 Kevin van Zonneveld (http://kevin.vanzonneveld.net)
  24.  * @license   http://www.opensource.org/licenses/bsd-license.php New BSD Licence
  25.  * @version   SVN: Release: $Id$
  26.  * @link      http://trac.plutonia.nl/projects/system_daemon
  27.  * * 
  28.  */
  29. class System_Daemon_OS_Debian extends System_Daemon_OS_Linux
  30. {
  31.     /**
  32.      * On Linux, a distro-specific version file is often telling us enough
  33.      *
  34.      * @var string
  35.      */
  36.     protected $osVersionFile = "/etc/debian_version";
  37.     
  38.     /**
  39.      * Template path
  40.      *
  41.      * @var string
  42.      */
  43.     protected $autoRunTemplatePath = "/etc/init.d/skeleton";    
  44.     
  45.     /**
  46.      * Replace the following keys with values to convert a template into
  47.      * a read autorun script
  48.      *
  49.      * @var array
  50.      */    
  51.     protected $autoRunTemplateReplace = array(
  52.         "Foo Bar" => "{PROPERTIES.authorName}",
  53.         "foobar@baz.org" => "{PROPERTIES.authorEmail}",
  54.         "daemonexecutablename" => "{PROPERTIES.appName}",
  55.         "Example" => "{PROPERTIES.appName}",
  56.         "skeleton" => "{PROPERTIES.appName}",
  57.         "/usr/sbin/\$NAME" => "{PROPERTIES.appDir}/{PROPERTIES.appExecutable}",
  58.         "Description of the service"=> "{PROPERTIES.appDescription}",
  59.         " --name \$NAME" => "",
  60.         "--options args" => "",
  61.         "# Please remove the \"Author\" lines above and replace them" => "",
  62.         "# with your own name if you copy and modify this script." => ""
  63.     );
  64.     
  65. }//end class
  66. ?>