refactoring scripts identiques : pod disable
This commit is contained in:
parent
75ebe2cd66
commit
87e06f592f
19
_podman-common/70_disable_pod.sh
Executable file
19
_podman-common/70_disable_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
|
||||||
|
|
||||||
|
# FAIL if pod does not exists
|
||||||
|
ensure_pod_exists ${pod_name}
|
||||||
|
|
||||||
|
# FAIL if systemd unit does not exists
|
||||||
|
ensure_systemd_unit_exists ${service_name}
|
||||||
|
|
||||||
|
# FAIL if systemd unit is running (stop it first)
|
||||||
|
ensure_systemd_unit_not_running ${service_name}
|
||||||
|
|
||||||
|
systemctl --user disable ${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
|
|
||||||
|
|
||||||
# FAIL if pod does not exists
|
|
||||||
ensure_pod_exists ${pod_name}
|
|
||||||
|
|
||||||
# FAIL if systemd unit does not exists
|
|
||||||
ensure_systemd_unit_exists ${service_name}
|
|
||||||
|
|
||||||
# FAIL if systemd unit is running (stop it first)
|
|
||||||
ensure_systemd_unit_not_running ${service_name}
|
|
||||||
|
|
||||||
systemctl --user disable ${service_name}
|
|
1
podman-framadate/70_disable.sh
Symbolic link
1
podman-framadate/70_disable.sh
Symbolic link
|
@ -0,0 +1 @@
|
||||||
|
../_podman-common/70_disable_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
|
|
||||||
|
|
||||||
# FAIL if pod does not exists
|
|
||||||
ensure_pod_exists ${pod_name}
|
|
||||||
|
|
||||||
# FAIL if systemd unit does not exists
|
|
||||||
ensure_systemd_unit_exists ${service_name}
|
|
||||||
|
|
||||||
# FAIL if systemd unit is running (stop it first)
|
|
||||||
ensure_systemd_unit_not_running ${service_name}
|
|
||||||
|
|
||||||
systemctl --user disable ${service_name}
|
|
1
podman-jitsi/70_disable.sh
Symbolic link
1
podman-jitsi/70_disable.sh
Symbolic link
|
@ -0,0 +1 @@
|
||||||
|
../_podman-common/70_disable_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
|
|
||||||
|
|
||||||
# FAIL if pod does not exists
|
|
||||||
ensure_pod_exists ${pod_name}
|
|
||||||
|
|
||||||
# FAIL if systemd unit does not exists
|
|
||||||
ensure_systemd_unit_exists ${service_name}
|
|
||||||
|
|
||||||
# FAIL if systemd unit is running (stop it first)
|
|
||||||
ensure_systemd_unit_not_running ${service_name}
|
|
||||||
|
|
||||||
systemctl --user disable ${service_name}
|
|
1
podman-matrix/70_disable.sh
Symbolic link
1
podman-matrix/70_disable.sh
Symbolic link
|
@ -0,0 +1 @@
|
||||||
|
../_podman-common/70_disable_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
|
|
||||||
|
|
||||||
# FAIL if pod does not exists
|
|
||||||
ensure_pod_exists ${pod_name}
|
|
||||||
|
|
||||||
# FAIL if systemd unit does not exists
|
|
||||||
ensure_systemd_unit_exists ${service_name}
|
|
||||||
|
|
||||||
# FAIL if systemd unit is running (stop it first)
|
|
||||||
ensure_systemd_unit_not_running ${service_name}
|
|
||||||
|
|
||||||
systemctl --user disable ${service_name}
|
|
1
podman-seafile/70_disable.sh
Symbolic link
1
podman-seafile/70_disable.sh
Symbolic link
|
@ -0,0 +1 @@
|
||||||
|
../_podman-common/70_disable_pod.sh
|
Loading…
Reference in a new issue