AA-SERVICE(1)

NAME
aa-service - Helper for execline script to get service name/instance

SYNOPSIS
aa-service [-D] [-l] PROG...

OPTIONS

-D, --double-output
    Enable double-output mode. Instead of using stdout for regular output, and stderr for warnings and errors, everything is sent both to stdout and stderr. This is intended to redirect stderr to a log file, so full output can be both shown on console and logged.

-h, --help
    Show help screen and exit.

-l, --log
    To use for a service logger run script, i.e. when current folder will be subfolder log of the servicedir.

-V, --version
    Show version information and exit.

DESCRIPTION
This is a little helper for execline scripts (e.g. a service's run script) that will perform variable substitution on PROG... for:

SERVICE_NAME
    Will be the name of the current folder, i.e. full service name (e.g. foobar or bar@foo)

SERVICE
    Will be the name of the service, without the instance name if any (e.g. foobar or bar)

INSTANCE
    Will be the instance name of the service if any, else empty string (e.g. empty string or foo)

This can be useful to get the service/instance name dynamicly; e.g. a service could use ${INSTANCE} as argument, and a generic logger could then use /var/log/${SERVICE_NAME} as logdir.

BUGS
They're probably crawling somewhere in there... if you happen to catch one, (or more) report it and I'll do my best to squash it.

REPOSITORY
You can find the latest source code of anopa as well as report bugs and/or suggest features on its GitHub repository, available at <https://github.com/jjk-jacky/anopa>; or visit its official website at <https://jjacky.com/anopa>

AUTHOR

Olivier Brunel <jjk@jjacky.com>