gitlab.com/creichlin/pentaconta@v0.1.1-0.20170921154330-ffd669064217/README.md (about)

     1  pentaconta
     2  ==========
     3  
     4  
     5  A service runner
     6  
     7  config
     8  ------
     9  
    10  Searches for a configfile in working dir and etc named pentaconta.yaml or pentaconta.json
    11  The config can be changed by giving a parameter `pentaconta -config custom/main`. This would look
    12  in `workingdir/custom/main.json` and `/etc/custom/main.json` as well as the yaml variants. Also
    13  an absolute path can be given.
    14  
    15      services:
    16        pc_stable_service:
    17          executable: /usr/bin/pc_stable
    18          arguments: [--foo, bar]
    19      
    20      fs-triggers:
    21        pc_stable_bin_trigger:
    22          path: /usr/bin/pc_stable
    23          services: [pc_stable_service]
    24  
    25        pc_stable_conf_trigger:
    26          path: /etc/pc_stable.yaml
    27          services: [pc_stable_service]
    28  
    29  This would define one service. The given executable is started and if it crashes ot terminates regularly
    30  it will be restarted after a pause of 1 second.
    31  
    32  The two fs-triggers are responsible that the service also gets restarted when the executable itself gets
    33  updated or when the config file gets updated.
    34  
    35  logs
    36  ----
    37  
    38  All the output from stdout and er are sent to stdout as well as some logging info from pentaconta itself:
    39  
    40      2017-04-21 23:01 49.012619 OUT pc_stable: Stable main started
    41      2017-04-21 23:01 50.012928 OUT pc_stable: I'm doing fine
    42      2017-04-21 23:01 51.013093 OUT pc_stable: I'm doing fine
    43      2017-04-21 23:02 01.015132 OUT pc_stable: I'm doing fine
    44      2017-04-21 23:02 01.310071 PEN pc_stable: Terminated service with signal: interrupt <--- service gets sigint from config file change
    45      2017-04-21 23:02 01.610011 PEN pc_stable: Sigint worked
    46      2017-04-21 23:02 02.313112 OUT pc_stable: Stable main started
    47      2017-04-21 23:02 03.313456 OUT pc_stable: I'm doing fine