diff options
| author | Joe Carstairs <me@joeac.net> | 2026-06-26 11:14:31 +0100 |
|---|---|---|
| committer | Joe Carstairs <me@joeac.net> | 2026-06-29 07:32:35 +0100 |
| commit | 86509e2598fc5689b00b770e793c348988b32187 (patch) | |
| tree | 21a8462ae5cdeba440a23c0b71a4a34570350651 /openrc | |
| parent | adc5498641db3c308798ef6afa9eb0e9623d1475 (diff) | |
installs joeac.net services as separate OpenRC services
Diffstat (limited to 'openrc')
| -rwxr-xr-x | openrc/joeac.net | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/openrc/joeac.net b/openrc/joeac.net index 00ab3b2..3a45694 100755 --- a/openrc/joeac.net +++ b/openrc/joeac.net @@ -3,10 +3,11 @@ # https://gist.github.com/itzwam/2069e935385193207f7e5bea7156e21d # https://github.com/0x17de/dockerservice-openrc +: ${MODULENAME:=${RC_SVCNAME##*.}} : ${SRCDIR:=/usr/local/lib/joeac.net} DOCKER_COMPOSE_UP_ARGS=${DOCKER_COMPOSE_UP_ARGS-"--no-build --no-recreate --no-deps"} -[ -z "${SVCNAME}" ] && exit 1 +[ -z "${MODULENAME}" ] && exit 1 : ${COMPOSEFILE:="${SRCDIR}/compose.yml"} : ${MAKEFILE:="${SRCDIR}/Makefile"} COMPOSECMD="/usr/bin/podman-compose" @@ -31,14 +32,14 @@ configtest() { start() { configtest || return 1 - ebegin "Starting ${SVCNAME}" - "${COMPOSECMD}" -f "${COMPOSEFILE}" up -d ${DOCKER_COMPOSE_UP_ARGS} + ebegin "Starting ${MODULENAME}" + "${COMPOSECMD}" -f "${COMPOSEFILE}" up -d ${DOCKER_COMPOSE_UP_ARGS} ${MODULENAME} eend $? } stop() { - ebegin "Stopping ${SVCNAME}" - "${COMPOSECMD}" -f "${COMPOSEFILE}" down --timeout=5 + ebegin "Stopping ${MODULENAME}" + "${COMPOSECMD}" -f "${COMPOSEFILE}" down --timeout=5 ${MODULENAME} eend $? } @@ -53,7 +54,7 @@ status() { else einfo "status: [$pod] stopped" fi - done < <("${COMPOSECMD}" -f "${COMPOSEFILE}" ps --quiet) + done < <("${COMPOSECMD}" -f "${COMPOSEFILE}" ps --quiet ${MODULENAME}) if [ $started -eq $pods ]; then einfo "status: started" else |
