Forums

tharok
tharok
Offline
Resolved
0 votes
Hi, I've installed the Services Manager addon and I think it's really helpful but I have some services that don't show up in the GUI. Is there a way to add them to the list? My services are in /etc/init.d/ like usual.
Thanks.
Thursday, April 03 2014, 03:36 PM
Share this post:
Responses (3)
  • Accepted Answer

    Tuesday, August 01 2017, 08:15 PM - #Permalink
    Resolved
    0 votes
    Working with :
    <?php

    ///////////////////////////////////////////////////////////////////////////////
    // B O O T S T R A P
    ///////////////////////////////////////////////////////////////////////////////

    $bootstrap = getenv('CLEAROS_BOOTSTRAP') ? getenv('CLEAROS_BOOTSTRAP') : '/usr/clearos/framework/shared';
    require_once $bootstrap . '/bootstrap.php';

    ///////////////////////////////////////////////////////////////////////////////
    // T R A N S L A T I O N S
    ///////////////////////////////////////////////////////////////////////////////

    clearos_load_language('samba_common');

    ///////////////////////////////////////////////////////////////////////////////
    // C O N F I G L E T
    ///////////////////////////////////////////////////////////////////////////////

    $configlet = array(
    'title' => 'rtorent',
    'package' => 'rtorrent',
    'process_name' => 'rtorrent',
    'pid_file' => '/home/rtorrent/temp/rtorrent.pid',
    'reloadable' => FALSE,
    'url' => ''
    );

    but as far as I discovered the file name must match service name... and file content is not important
    The reply is currently minimized Show
  • Accepted Answer

    Thursday, March 12 2015, 11:56 PM - #Permalink
    Resolved
    0 votes
    Hi,

    What is the purpose of each attributes ?
            'title' => 'Monitorix',
    'package' => 'monitorix',
    'process_name' => 'monitorix',
    'pid_file' => '/var/run/monitorix.pid',
    'reloadable' => FALSE,
    'url' => '/monitorix'


    I could easely understand tittle & process_name.
    But what is package for ?
    reloadable boolean ?
    url ?
    If service do not have any .pid file could we leave pid_file blank ? Or do we need to find a substitute ?
    The reply is currently minimized Show
  • Accepted Answer

    Friday, April 04 2014, 02:12 PM - #Permalink
    Resolved
    0 votes
    You need to drop a 'configlet' into:
    /var/clearos/base/daemon


    The name of the file *must* be the name of the init script with .php extension. For example, rsyslog.php.

    Here's an example of one so you can use it as a template to create your own. The only difference I'd suggest is that you hardcode the title since the base language template will get stomped on with updates. Eg.
    'title' => 'My Friendly Service Name',


    B.
    The reply is currently minimized Show
Your Reply