summaryrefslogtreecommitdiff
path: root/openrc
diff options
context:
space:
mode:
authorJoe Carstairs <me@joeac.net>2026-08-12 17:21:13 +0100
committerJoe Carstairs <me@joeac.net>2026-08-12 17:21:13 +0100
commit4c3a68b72fd91a85a332161b9cf181566cef9289 (patch)
tree0397c48e8825fdd3320899698e0d5a611b09afbe /openrc
parent4f8d16ebcb16811d6a7a95d659be7e138d2713ef (diff)
remove remaining make stuff
Diffstat (limited to 'openrc')
-rw-r--r--openrc/conf.d/user.template15
-rwxr-xr-xopenrc/init.d/joeac.net.template65
2 files changed, 0 insertions, 80 deletions
diff --git a/openrc/conf.d/user.template b/openrc/conf.d/user.template
deleted file mode 100644
index 2bf637b..0000000
--- a/openrc/conf.d/user.template
+++ /dev/null
@@ -1,15 +0,0 @@
-UID="$$(id -u ${USER})"
-if test -z "$${XDG_RUNTIME_DIR}"; then
- export XDG_RUNTIME_DIR=/tmp/xdg/"$${UID}"-xdg-runtime-dir
- if ! test -d "$${XDG_RUNTIME_DIR}"; then
- mkdir -p "$${XDG_RUNTIME_DIR}"
- chown -R ${USER}:${USER} "$${XDG_RUNTIME_DIR}"
- chmod -R 0700 "$${XDG_RUNTIME_DIR}"
- fi
-fi
-if ! test -f "$${XDG_RUNTIME_DIR}/openrc/softlevel"; then
- mkdir -p "$${XDG_RUNTIME_DIR}/openrc"
- touch "$${XDG_RUNTIME_DIR}/openrc/softlevel"
- chown -R ${USER}:${USER} "$${XDG_RUNTIME_DIR}"
- chmod -R 0700 "$${XDG_RUNTIME_DIR}"
-fi
diff --git a/openrc/init.d/joeac.net.template b/openrc/init.d/joeac.net.template
deleted file mode 100755
index 53763fa..0000000
--- a/openrc/init.d/joeac.net.template
+++ /dev/null
@@ -1,65 +0,0 @@
-#!/sbin/openrc-run
-# credits:
-# https://gist.github.com/itzwam/2069e935385193207f7e5bea7156e21d
-# https://github.com/0x17de/dockerservice-openrc
-
-: $${HOME:=/home/joeac.net}
-: $${MODULENAME:=$${RC_SVCNAME##*.}}
-: $${SRCDIR:=$$HOME/joeac.net}
-DOCKER_COMPOSE_UP_ARGS=$${DOCKER_COMPOSE_UP_ARGS-"--no-build --no-recreate --no-deps"}
-
-[ -z "$${MODULENAME}" ] && exit 1
-: $${COMPOSEFILE:="$${SRCDIR}/compose.yml"}
-: $${MAKEFILE:="$${SRCDIR}/Makefile"}
-export COMPOSE_HTTP_TIMEOUT=300
-
-description="Manage dockerservices defined in $${COMPOSEFILE}"
-extra_commands="configtest"
-description_configtest="Check configuration via \"podman-compose -f $${COMPOSEFILE} config\""
-
-configtest() {
- if ! [ -f "$${COMPOSEFILE}" ]; then
- eerror "The docker-compose file $${COMPOSEFILE} does not exist!"
- return 1
- fi
- if ${COMPOSECMD} -f "$${COMPOSEFILE}" config >&/dev/null; then
- einfo "config: ok"
- else
- eerror "config: error"
- return 1
- fi
-}
-
-start() {
- configtest || return 1
- ebegin "Starting $${MODULENAME}"
- ${COMPOSECMD} -f "$${COMPOSEFILE}" up -d $${DOCKER_COMPOSE_UP_ARGS} $${MODULENAME}
- eend $$?
-}
-
-stop() {
- ebegin "Stopping $${MODULENAME}"
- ${COMPOSECMD} -f "$${COMPOSEFILE}" down --timeout=5 $${MODULENAME}
- eend $$?
-}
-
-status() {
- pods=0
- started=0
- while read pod; do
- pod_service="$$(podman inspect $$pod | jq .[0].Config.Labels.[\"com.docker.compose.service\"])"
- if ! [ "$$pod_service" = "\"$${MODULENAME}\"" ]; then
- continue
- fi
- pods=$$(($$pods+1))
- if podman top $$pod &>/dev/null; then
- einfo "status: [$$pod] started"
- exit 0
- else
- einfo "status: [$$pod] stopped"
- exit 3
- fi
- done < <(${COMPOSECMD} -f "$${COMPOSEFILE}" ps --quiet)
- einfo "status: no container found for $${MODULENAME}"
- exit 3
-}