238. Service

Service manipulation

238.1. Summary of Module Globals

List of Global Functions

List of Global Variables

    238.2. Global Functions

    238.2.1. Adjust

    Adjust runlevels in which the service runs.

    Function parameters

    • string name

    • string action

    Return value

    • boolean - success state

    238.2.2. Disable

    Disable service

    Function parameters

    • string service

    Return value

    • boolean - true if operation is successful

    238.2.3. Enable

    Enable service

    Function parameters

    • string service

    Return value

    • boolean - true if operation is successful

    238.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

    238.2.5. Error

    Error Message

    Return value

    • string - error message from the last operation

    238.2.6. Finetune

    Set service to run in selected runlevels.

    Function parameters

    • string name

    • list rl

    Return value

    • boolean - success state

    238.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 ($[])

    238.2.8. Info

    Get service info without peeking if service runs.

    Function parameters

    • string name

    Return value

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

    238.2.9. Reload

    Reload service

    Function parameters

    • string service

    Return value

    • boolean - true if operation is successful

    238.2.10. Restart

    Restart service

    Function parameters

    • string service

    Return value

    • boolean - true if operation is successful

    238.2.11. RunInitScript

    Run init script.

    Function parameters

    • string name

    • string param

    Return value

    • integer - exit value

    238.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]

    238.2.13. RunInitScriptWithTimeOut

    Run init script with a time-out.

    Function parameters

    • string name

    • string param

    Return value

    • integer - exit value

    238.2.14. Start

    Start service

    Function parameters

    • string service

    Return value

    • boolean - true if operation is successful

    238.2.15. Status

    Get service status.

    Function parameters

    • string name

    Return value

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

    238.2.16. Stop

    Stop service

    Function parameters

    • string service

    Return value

    • boolean - true if operation is successful

    238.3. Global Variables

    238.4. Module Requirements

    none