From 58e161f6b439151b467eb8de93e457e811384101 Mon Sep 17 00:00:00 2001 From: Gitouche <26656-gitouche@users.noreply.framagit.org> Date: Tue, 4 May 2021 22:26:14 +0200 Subject: [PATCH] podman-peerjs add scripts --- podman-peerjs/{80_disable.sh => 70_disable.sh} | 0 podman-peerjs/80_destroy.sh | 18 ++++++++++++++++++ podman-peerjs/90_prune.sh | 11 +++++++++++ 3 files changed, 29 insertions(+) rename podman-peerjs/{80_disable.sh => 70_disable.sh} (100%) create mode 100644 podman-peerjs/80_destroy.sh create mode 100644 podman-peerjs/90_prune.sh diff --git a/podman-peerjs/80_disable.sh b/podman-peerjs/70_disable.sh similarity index 100% rename from podman-peerjs/80_disable.sh rename to podman-peerjs/70_disable.sh diff --git a/podman-peerjs/80_destroy.sh b/podman-peerjs/80_destroy.sh new file mode 100644 index 0000000..ce64ecd --- /dev/null +++ b/podman-peerjs/80_destroy.sh @@ -0,0 +1,18 @@ +#!/usr/bin/env bash + +ABSDIR="$( dirname "$(readlink -f -- "$0")" )" +source ${ABSDIR}/../functions.sh +source ${ABSDIR}/vars.sh + +ensure_pwd_is_scriptdir +ensure_not_root + +if ! podman container exists ${container_name}; then + echo container ${container_name} does not exists. + exit 1 +fi + +# add check if running, stop first +# add check if systemctl exists, disable first + +podman rm ${container_name} diff --git a/podman-peerjs/90_prune.sh b/podman-peerjs/90_prune.sh new file mode 100644 index 0000000..a34f857 --- /dev/null +++ b/podman-peerjs/90_prune.sh @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +ABSDIR="$( dirname "$(readlink -f -- "$0")" )" +source ${ABSDIR}/../functions.sh +source ${ABSDIR}/vars.sh + +ensure_pwd_is_scriptdir +ensure_not_root + +podman rm ${container_name} +podman rmi ${image_name}