Sixth Commit

This commit is contained in:
Andrew Hurley 2023-02-27 23:10:48 +08:00
parent a2020c989d
commit a810454dcf
1 changed files with 6 additions and 6 deletions

View File

@ -78,8 +78,8 @@ stop-pod () {
systemctl stop podman-${PODNAME}.service || return 1
fi
else
if podman pod exists "${PODNAME}"; then
podman pod stop -t 70 "${PODNAME}" || return 2
if "${RUNTIME}" pod exists "${PODNAME}"; then
"${RUNTIME}" pod stop -t 70 "${PODNAME}" || return 2
fi
fi
}
@ -119,7 +119,7 @@ remove-services () {
# sub ----------------------------------------------------- install services
install-services () {
(cd "${SYSTEMD}" && \
podman generate systemd \
"${RUNTIME}" generate systemd \
--name \
--new \
--stop-timeout=70 \
@ -169,7 +169,7 @@ for PROJECT in $*; do
printf ":: ${COMMAND} ${PROJECT}\n"
# --------------------------------------------------------- network
podman network exists ${NETWORK} \
"${RUNTIME}" network exists ${NETWORK} \
|| podman network create ${NETWORK}
SUBNET="$(podman network inspect ${NETWORK} \
|grep -w "\"subnet\":" |sed 's/[\":,a-z,A-Z ]//g')"
@ -177,7 +177,7 @@ for PROJECT in $*; do
#printf "${SUBNET_PREFIX}" > "${PROJECT}-subnet"
# --------------------------------------------------------- proxy network
podman network exists proxy-net \
"${RUNTIME}" network exists proxy-net \
|| podman network create proxy-net
PROXY_SUBNET="$(podman network inspect proxy-net \
|grep -w "\"subnet\":" |sed 's/[\":,a-z,A-Z ]//g')"
@ -220,7 +220,7 @@ for PROJECT in $*; do
# --------------------------------------------------------- pod
stop-pod
podman pod create \
"${RUNTIME}" pod create \
${SPEC_NAME}-pod \
${SPEC_INFRA_NAME} \
--replace