Set full path to pct
This commit is contained in:
parent
123f5afaa2
commit
c5acd253ac
|
@ -125,7 +125,7 @@ is_lxc_container_absent() { # {{{
|
|||
return_is_lxc_container_absent="0"
|
||||
|
||||
## Check if the system runs on a PVE kernel
|
||||
if ! pct list -- | grep --quiet "${local_ct_id}";
|
||||
if ! /usr/sbin/pct list -- | grep --quiet "${local_ct_id}";
|
||||
then
|
||||
return_is_lxc_container_absent="0"
|
||||
debug_message "is_lxc_container_absent − \
|
||||
|
@ -146,7 +146,7 @@ is_lxc_container_state() { # {{{
|
|||
local_ct_state="${2}"
|
||||
|
||||
## Compare the status of the LXC container with argument
|
||||
if pct status "${local_ct_id}" -- | grep --quiet --word-regexp "${local_ct_state}";
|
||||
if /usr/sbin/pct status "${local_ct_id}" -- | grep --quiet --word-regexp "${local_ct_state}";
|
||||
then
|
||||
return_is_lxc_container_state="0"
|
||||
debug_message "is_lxc_container_state − \
|
||||
|
@ -169,7 +169,7 @@ start_lxc_container() { # {{{
|
|||
return_start_lxc_container="1"
|
||||
|
||||
## Start LXC container state
|
||||
pct start "${local_ct_id}" || exit 1
|
||||
/usr/sbin/pct start "${local_ct_id}" || exit 1
|
||||
|
||||
## Wait a little for the container to start
|
||||
sleep "${sleep_delay}"
|
||||
|
@ -198,7 +198,7 @@ stop_lxc_container() { # {{{
|
|||
return_stop_lxc_container="1"
|
||||
|
||||
## Stop LXC container state
|
||||
pct stop "${local_ct_id}" || exit 1
|
||||
/usr/sbin/pct stop "${local_ct_id}" || exit 1
|
||||
|
||||
## Wait a little for the container to stop
|
||||
sleep "${sleep_delay}"
|
||||
|
@ -225,13 +225,13 @@ upgrade_container() { # {{{
|
|||
|
||||
## Keep output if DEBUG mode is activated
|
||||
if [ "${DEBUG}" -eq "0" ]; then
|
||||
pct exec "${local_ct_id:-/dev/null}" -- bash -c "wget https://git.ipr.univ-rennes1.fr/cellinfo/scripts/raw/master/proxmox/proxmox.template.debian.sh --output-document=/tmp/proxmox.template.debian.sh" || exit 2
|
||||
pct exec "${local_ct_id:-/dev/null}" -- bash -c "chmod +x /tmp/proxmox.template.debian.sh" || exit 2
|
||||
pct exec "${local_ct_id:-/dev/null}" -- bash -c "/tmp/proxmox.template.debian.sh" || exit 2
|
||||
/usr/sbin/pct exec "${local_ct_id:-/dev/null}" -- bash -c "wget https://git.ipr.univ-rennes1.fr/cellinfo/scripts/raw/master/proxmox/proxmox.template.debian.sh --output-document=/tmp/proxmox.template.debian.sh" || exit 2
|
||||
/usr/sbin/pct exec "${local_ct_id:-/dev/null}" -- bash -c "chmod +x /tmp/proxmox.template.debian.sh" || exit 2
|
||||
/usr/sbin/pct exec "${local_ct_id:-/dev/null}" -- bash -c "/tmp/proxmox.template.debian.sh" || exit 2
|
||||
else
|
||||
pct exec "${local_ct_id:-/dev/null}" -- bash -c "wget --quiet https://git.ipr.univ-rennes1.fr/cellinfo/scripts/raw/master/proxmox/proxmox.template.debian.sh --output-document=/tmp/proxmox.template.debian.sh" || exit 2
|
||||
pct exec "${local_ct_id:-/dev/null}" -- bash -c "chmod +x /tmp/proxmox.template.debian.sh" || exit 2
|
||||
pct exec "${local_ct_id:-/dev/null}" -- bash -c "/tmp/proxmox.template.debian.sh" > /dev/null 2>&1 || exit 2
|
||||
/usr/sbin/pct exec "${local_ct_id:-/dev/null}" -- bash -c "wget --quiet https://git.ipr.univ-rennes1.fr/cellinfo/scripts/raw/master/proxmox/proxmox.template.debian.sh --output-document=/tmp/proxmox.template.debian.sh" || exit 2
|
||||
/usr/sbin/pct exec "${local_ct_id:-/dev/null}" -- bash -c "chmod +x /tmp/proxmox.template.debian.sh" || exit 2
|
||||
/usr/sbin/pct exec "${local_ct_id:-/dev/null}" -- bash -c "/tmp/proxmox.template.debian.sh" > /dev/null 2>&1 || exit 2
|
||||
fi
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue