moves openrc -> openrc/init.d
This commit is contained in:
@@ -116,10 +116,10 @@ endif
|
||||
$(foreach module,$(MODULES),$(eval $(install_module_rule)))
|
||||
$(foreach module,$(MODULES),$(eval $(uninstall_module_rule)))
|
||||
|
||||
~/.config/rc/init.d/joeac.net: openrc/joeac.net ~/.config/rc/init.d ~/.config/rc/runlevels/default
|
||||
~/.config/rc/init.d/joeac.net: openrc/init.d/joeac.net ~/.config/rc/init.d ~/.config/rc/runlevels/default
|
||||
rm -f ~/.config/rc/init.d/joeac.net; \
|
||||
mkdir -p ~/.config/rc/init.d; \
|
||||
cp openrc/joeac.net ~/.config/rc/init.d/joeac.net
|
||||
cp openrc/init.d/joeac.net ~/.config/rc/init.d/joeac.net
|
||||
|
||||
~/.config/rc/init.d:
|
||||
mkdir -p ~/.config/rc/init.d
|
||||
|
||||
@@ -47,18 +47,19 @@ 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"
|
||||
started=$(($started+1))
|
||||
exit 0
|
||||
else
|
||||
einfo "status: [$pod] stopped"
|
||||
exit 3
|
||||
fi
|
||||
done < <("${COMPOSECMD}" -f "${COMPOSEFILE}" ps --quiet ${MODULENAME})
|
||||
if [ $started -eq $pods ]; then
|
||||
einfo "status: started"
|
||||
else
|
||||
einfo "status: stopped"
|
||||
return 3
|
||||
fi
|
||||
done < <("${COMPOSECMD}" -f "${COMPOSEFILE}" ps --quiet)
|
||||
einfo "status: no container found for ${MODULENAME}"
|
||||
exit 3
|
||||
}
|
||||
Reference in New Issue
Block a user