[main]
@type = oneshot
@version = @vers@
@description = "Launch all trees enabled of root user"
@user = ( root )
@depends = ( local-branch )

[start]
@execute =
(
    if { 66-yeller -cdp runtime-branch -1 /dev/console launch every enabled trees }
    if -nt {

        execl-envfile ${conf_file}
        66 -v${verbosity} -l ${LIVE} tree start

    }
    execl-envfile ${conf_file}
    66-yeller -Fcdp runtime-branch -1 /dev/console crashed! -- Your machine is operational but some runtime service failed to start correctly. Please see the complete boot log at ${LIVE}/log/0/runtime-branch/current file for further information.
)

[stop]
@execute =
(
    if { 66-yeller -cdp runtime-branch -1 /dev/console stops every trees }
    if -nt {

        execl-envfile ${conf_file}
        66 -v${verbosity} -T ${timeout} -l ${LIVE} tree stop

    }
    ## use -F here, we don't want to crash to avoid to
    ## not bring down properly the rest of the service
    66-yeller -Fcdp runtime-branch -1 /dev/console crashed!
)

[environment]
conf_file=!@initconf@
## Time to wait to bring down services
timeout=!3000
verbosity=3

[logger]
@destination = @live_dir@/log/runtime-branch
