diff --git a/config_panel.toml b/config_panel.toml index 8a9db1c..bf5a682 100644 --- a/config_panel.toml +++ b/config_panel.toml @@ -39,7 +39,7 @@ services = ["__APP__"] ask = "Choose/Change rpc secret" type = "string" redact = true - bind = "rpc_secret:/opt/yunohost/__APP__/garage.toml" + bind = "rpc_secret:__INSTALL_DIR__/garage.toml" pattern.regexp = '^[0-9a-f]{64}$' pattern.error = "rpc_secret have to be a 32-byte hex-encoded random string. See https://garagehq.deuxfleurs.fr/documentation/reference-manual/configuration/ for more information" help = "Be careful if your node is already connected to a cluster, it won't be able to connect anymore if you change the rpc_secret value" diff --git a/scripts/config b/scripts/config index 61950b5..ebe614c 100644 --- a/scripts/config +++ b/scripts/config @@ -21,8 +21,8 @@ set__weight() { old_weight="$(ynh_app_setting_get --app=$app --key=weight)" if [ $old_weight -le $weight ] then - qemu-img resize $datadir/garage_data.qcow2 "$weight"G - qemu-nbd --connect /dev/nbd$nbd_index $datadir/garage_data.qcow2 + qemu-img resize $data_dir/garage_data.qcow2 "$weight"G + qemu-nbd --connect /dev/nbd$nbd_index $data_dir/garage_data.qcow2 e2fsck -f -y /dev/nbd$nbd_index resize2fs /dev/nbd$nbd_index qemu-nbd --disconnect /dev/nbd$nbd_index @@ -30,7 +30,7 @@ set__weight() { e2fsck -f -y /dev/nbd0 resize2fs /dev/nbd$nbd_index $weightG qemu-nbd --disconnect /dev/nbd$nbd_index - qemu-img resize --shrink $datadir/garage_data.qcow2 "$weight"G + qemu-img resize --shrink $data_dir/garage_data.qcow2 "$weight"G fi $install_dir/umount_disk.sh systemctl start $app @@ -65,7 +65,7 @@ ask: $status" EOF -if [[ "$(echo \"$status\" | grep \"FAILED NODES\")" ]] || [[ "$(echo \"$status\" | grep 'garage layout show')" ]] +if echo "$status" | grep -q "FAILED NODES\|garage layout show" then cat << EOF style: "danger"