From 3c7ab1546c7af3611af3d0a25f61b1772800e58a Mon Sep 17 00:00:00 2001 From: Gitouche <26656-gitouche@users.noreply.framagit.org> Date: Fri, 4 Jun 2021 13:22:38 +0200 Subject: [PATCH] podman-jitsi : light improvements --- podman-jitsi/20_enable.sh | 20 ++++++++++++++------ podman-jitsi/vars.sh | 5 +++++ 2 files changed, 19 insertions(+), 6 deletions(-) create mode 100644 podman-jitsi/vars.sh diff --git a/podman-jitsi/20_enable.sh b/podman-jitsi/20_enable.sh index 04f3556..ee3f331 100644 --- a/podman-jitsi/20_enable.sh +++ b/podman-jitsi/20_enable.sh @@ -1,10 +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 + +ensure_pod_exists ${pod_name} +ensure_systemd_as_user_dir_exists + # pod must be running and not managed by systemd - - -mkdir -p ~/.config/systemd/user/ -podman generate systemd --files --name podman-jitsi +podman generate systemd --files --name ${pod_name} cp *.service ~/.config/systemd/user/ -podman pod stop podman-jitsi -systemctl --user --now enable pod-podman-jitsi.service +podman pod stop ${pod_name} +systemctl --user --now enable ${service_name} diff --git a/podman-jitsi/vars.sh b/podman-jitsi/vars.sh new file mode 100644 index 0000000..6d85e65 --- /dev/null +++ b/podman-jitsi/vars.sh @@ -0,0 +1,5 @@ +#!/usr/bin/env bash + +pod_name='podman-jitsi' +service_name="pod-${container_name}.service" +version='stable-5870'