refactoring scripts identiques : pod enable
This commit is contained in:
parent
ed28bd840d
commit
bbb688436c
19
_podman-common/20_enable_pod.sh
Executable file
19
_podman-common/20_enable_pod.sh
Executable file
|
@ -0,0 +1,19 @@
|
||||||
|
#!/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
|
||||||
|
podman generate systemd --files --name ${pod_name}
|
||||||
|
mv *.service ~/.config/systemd/user/
|
||||||
|
|
||||||
|
podman pod stop ${pod_name}
|
||||||
|
systemctl --user enable ${service_name}
|
|
@ -1,19 +0,0 @@
|
||||||
#!/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
|
|
||||||
podman generate systemd --files --name ${pod_name}
|
|
||||||
mv *.service ~/.config/systemd/user/
|
|
||||||
|
|
||||||
podman pod stop ${pod_name}
|
|
||||||
systemctl --user enable ${service_name}
|
|
1
podman-framadate/20_enable.sh
Symbolic link
1
podman-framadate/20_enable.sh
Symbolic link
|
@ -0,0 +1 @@
|
||||||
|
../_podman-common/20_enable_pod.sh
|
|
@ -1,19 +0,0 @@
|
||||||
#!/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
|
|
||||||
podman generate systemd --files --name ${pod_name}
|
|
||||||
mv *.service ~/.config/systemd/user/
|
|
||||||
|
|
||||||
podman pod stop ${pod_name}
|
|
||||||
systemctl --user enable ${service_name}
|
|
1
podman-jitsi/20_enable.sh
Symbolic link
1
podman-jitsi/20_enable.sh
Symbolic link
|
@ -0,0 +1 @@
|
||||||
|
../_podman-common/20_enable_pod.sh
|
|
@ -1,19 +0,0 @@
|
||||||
#!/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
|
|
||||||
podman generate systemd --files --name ${pod_name}
|
|
||||||
mv *.service ~/.config/systemd/user/
|
|
||||||
|
|
||||||
podman pod stop ${pod_name}
|
|
||||||
systemctl --user enable ${service_name}
|
|
1
podman-matrix/20_enable.sh
Symbolic link
1
podman-matrix/20_enable.sh
Symbolic link
|
@ -0,0 +1 @@
|
||||||
|
../_podman-common/20_enable_pod.sh
|
|
@ -1,19 +0,0 @@
|
||||||
#!/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
|
|
||||||
podman generate systemd --files --name ${pod_name}
|
|
||||||
mv *.service ~/.config/systemd/user/
|
|
||||||
|
|
||||||
podman pod stop ${pod_name}
|
|
||||||
systemctl --user enable ${service_name}
|
|
1
podman-seafile/20_enable.sh
Symbolic link
1
podman-seafile/20_enable.sh
Symbolic link
|
@ -0,0 +1 @@
|
||||||
|
../_podman-common/20_enable_pod.sh
|
Loading…
Reference in a new issue