211. Service

Service manipulation

211.1. Summary of Module Globals

List of Global Functions

List of Global Variables

    211.2. Global Functions

    211.2.1. Adjust

    Adjust runlevels in which the service runs.

    Function parameters

    • string name

    • string action

    Return value

    • boolean - success state

    211.2.2. Disable

    Disable service

    Function parameters

    • string service

    Return value

    • boolean - true if operation is successful

    211.2.3. Enable

    Enable service

    Function parameters

    • string service

    Return value

    • boolean - true if operation is successful

    211.2.4. Enabled

    Check if service is enabled

    Function parameters

    • string name

    Return value

    • boolean - true if service is set to run in any runlevel

    211.2.5. Error

    Error Message

    Return value

    • string - error message from the last operation

    211.2.6. Finetune

    Set service to run in selected runlevels.

    Function parameters

    • string name

    • list rl

    Return value

    • boolean - success state

    211.2.7. FullInfo

    Get service info and find out whether service is running.

    Function parameters

    • string name

    Return value

    • map - service map or empty map ($[])

    211.2.8. Info

    Get service info without peeking if service runs.

    Function parameters

    • string name

    Return value

    • map - Service information or empty map ($[])

    211.2.9. Reload

    Reload service

    Function parameters

    • string service

    Return value

    • boolean - true if operation is successful

    211.2.10. Restart

    Restart service

    Function parameters

    • string service

    Return value

    • boolean - true if operation is successful

    211.2.11. RunInitScript

    Run init script.

    Function parameters

    • string name

    • string param

    Return value

    • integer - exit value

    211.2.12. RunInitScriptOutput

    Run init script and return output

    Function parameters

    • string name

    • string param

    Return value

    • map - A map of $[ "stdout" : "...", "stderr" : "...", "exit" : int]

    211.2.13. RunInitScriptWithTimeOut

    Run init script with a time-out.

    Function parameters

    • string name

    • string param

    Return value

    • integer - exit value

    211.2.14. Start

    Start service

    Function parameters

    • string service

    Return value

    • boolean - true if operation is successful

    211.2.15. Status

    Get service status.

    Function parameters

    • string name

    Return value

    • integer - init script exit status or -1 if it does not exist

    211.2.16. Stop

    Stop service

    Function parameters

    • string service

    Return value

    • boolean - true if operation is successful

    211.3. Global Variables

    211.4. Module Requirements

    none