1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/yunorunner_ynh.git synced 2024-09-03 20:36:13 +02:00

Fix missing lxd key

This commit is contained in:
Salamandar 2024-03-15 14:45:06 +01:00
parent 02153981ee
commit 0cdad2a23d
2 changed files with 8 additions and 3 deletions

View file

@ -59,8 +59,8 @@ ram.runtime = "50M"
[install.backend] [install.backend]
ask.en = "Should you use LXD or Incus (LXD support will be removed soon)" ask.en = "Should you use LXD or Incus (LXD support will be removed soon)"
type = "select" type = "select"
choices = ["lxd", "incus"] choices = ["lxd"]
default = "incus" default = "lxd"
[resources] [resources]
[resources.system_user] [resources.system_user]

View file

@ -54,7 +54,7 @@ if [[ -z "${context:-}" ]]; then
fi fi
if [[ -z "${cluster:-}" ]]; then if [[ -z "${cluster:-}" ]]; then
if incus cluster list >/dev/null 2>&1; then if lxc cluster list >/dev/null 2>&1; then
cluster=1 cluster=1
else else
cluster=0 cluster=0
@ -62,6 +62,11 @@ if [[ -z "${cluster:-}" ]]; then
ynh_app_setting_set --app="$app" --key="cluster" --value="$cluster" ynh_app_setting_set --app="$app" --key="cluster" --value="$cluster"
fi fi
if [[ -z "${backend:-}" ]]; then
backend=lxd
ynh_app_setting_set --app="$app" --key="lxd" --value="$lxd"
fi
# Values now use underscore # Values now use underscore
if echo "$context" | grep -- -; then if echo "$context" | grep -- -; then
context=$(echo "$context" | tr - _) context=$(echo "$context" | tr - _)