mirror of
https://github.com/YunoHost/yunohost_demo.git
synced 2024-09-03 19:56:44 +02:00
Update ynh_lxd
This commit is contained in:
parent
e04cca93b1
commit
02985e0342
1 changed files with 5 additions and 3 deletions
8
ynh_lxd
8
ynh_lxd
|
@ -336,7 +336,7 @@ ynh_lxc_create(){
|
||||||
log_critical "Can't find base image $image"
|
log_critical "Can't find base image $image"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ ! -z "$PACKAGE_CHECK_EXEC" ]
|
if [ ! -z "$FOR_PACKAGE_CHECK" ]
|
||||||
then
|
then
|
||||||
pipestatus="${PIPESTATUS[0]}"
|
pipestatus="${PIPESTATUS[0]}"
|
||||||
location=$(ynh_exec_as $app lxc list --format json | jq -e --arg name $name '.[] | select(.name==$name) | .location' | tr -d '"')
|
location=$(ynh_exec_as $app lxc list --format json | jq -e --arg name $name '.[] | select(.name==$name) | .location' | tr -d '"')
|
||||||
|
@ -346,7 +346,7 @@ ynh_lxc_create(){
|
||||||
fi
|
fi
|
||||||
|
|
||||||
_ynh_lxc_start_and_wait --name="$name"
|
_ynh_lxc_start_and_wait --name="$name"
|
||||||
if [ ! -z "$PACKAGE_CHECK_EXEC" ]
|
if [ ! -z "$FOR_PACKAGE_CHECK" ]
|
||||||
then
|
then
|
||||||
ynh_lxc_set_witness --name="$name"
|
ynh_lxc_set_witness --name="$name"
|
||||||
fi
|
fi
|
||||||
|
@ -446,7 +446,7 @@ ynh_lxc_create_snapshot() {
|
||||||
|
|
||||||
ynh_lxc_start_timer
|
ynh_lxc_start_timer
|
||||||
|
|
||||||
if [ ! -z "$PACKAGE_CHECK_EXEC" ]
|
if [ ! -z "$FOR_PACKAGE_CHECK" ]
|
||||||
then
|
then
|
||||||
# Check all the witness files, to verify if them still here
|
# Check all the witness files, to verify if them still here
|
||||||
ynh_lxc_check_witness >&2
|
ynh_lxc_check_witness >&2
|
||||||
|
@ -799,6 +799,8 @@ ynh_lxc_stop_timer() {
|
||||||
# PACKAGE_CHECK helpers
|
# PACKAGE_CHECK helpers
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
|
# ynh_lxd commands have to be launch with FOR_PACKAGE_CHECK=1
|
||||||
|
|
||||||
# Start an LXC and execute a command in it, to be used for PACKAGE_CHECK_EXEC
|
# Start an LXC and execute a command in it, to be used for PACKAGE_CHECK_EXEC
|
||||||
#
|
#
|
||||||
# usage: ynh_lxc_exec --name=name --command=command
|
# usage: ynh_lxc_exec --name=name --command=command
|
||||||
|
|
Loading…
Reference in a new issue