services-garbaye/podman-matrix/80_destroy.sh

23 lines
568 B
Bash
Raw Normal View History

2021-06-14 10:42:59 +00:00
#!/usr/bin/env bash
ABSDIR="$( dirname "$(readlink -f -- "$0")" )"
source ${ABSDIR}/../functions.sh
source ${ABSDIR}/vars.sh
ensure_pwd_is_scriptdir
ensure_not_root
# FAIL if pod does not exists
ensure_pod_exists ${pod_name}
# FAIL if pod is running
ensure_pod_not_running ${pod_name}
${ABSDIR}/70_disable.sh
rm -f ${HOME}/.config/systemd/user/${service_name}
2021-06-14 10:57:23 +00:00
rm -f ${HOME}/.config/systemd/user/container-${container_name}.service
rm -f ${HOME}/.config/systemd/user/container-${db_container_name}.service
2021-06-14 10:42:59 +00:00
systemctl --user daemon-reload
podman pod rm ${pod_name}