mirror of
https://github.com/YunoHost-Apps/garage_ynh.git
synced 2024-09-03 18:36:32 +02:00
Attempt to fix config panel ...²
This commit is contained in:
parent
e9ca0f074a
commit
50939cbc5f
2 changed files with 5 additions and 5 deletions
|
@ -39,7 +39,7 @@ services = ["__APP__"]
|
||||||
ask = "Choose/Change rpc secret"
|
ask = "Choose/Change rpc secret"
|
||||||
type = "string"
|
type = "string"
|
||||||
redact = true
|
redact = true
|
||||||
bind = "rpc_secret:/opt/yunohost/__APP__/garage.toml"
|
bind = "rpc_secret:__INSTALL_DIR__/garage.toml"
|
||||||
pattern.regexp = '^[0-9a-f]{64}$'
|
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"
|
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"
|
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"
|
||||||
|
|
|
@ -21,8 +21,8 @@ set__weight() {
|
||||||
old_weight="$(ynh_app_setting_get --app=$app --key=weight)"
|
old_weight="$(ynh_app_setting_get --app=$app --key=weight)"
|
||||||
if [ $old_weight -le $weight ]
|
if [ $old_weight -le $weight ]
|
||||||
then
|
then
|
||||||
qemu-img resize $datadir/garage_data.qcow2 "$weight"G
|
qemu-img resize $data_dir/garage_data.qcow2 "$weight"G
|
||||||
qemu-nbd --connect /dev/nbd$nbd_index $datadir/garage_data.qcow2
|
qemu-nbd --connect /dev/nbd$nbd_index $data_dir/garage_data.qcow2
|
||||||
e2fsck -f -y /dev/nbd$nbd_index
|
e2fsck -f -y /dev/nbd$nbd_index
|
||||||
resize2fs /dev/nbd$nbd_index
|
resize2fs /dev/nbd$nbd_index
|
||||||
qemu-nbd --disconnect /dev/nbd$nbd_index
|
qemu-nbd --disconnect /dev/nbd$nbd_index
|
||||||
|
@ -30,7 +30,7 @@ set__weight() {
|
||||||
e2fsck -f -y /dev/nbd0
|
e2fsck -f -y /dev/nbd0
|
||||||
resize2fs /dev/nbd$nbd_index $weightG
|
resize2fs /dev/nbd$nbd_index $weightG
|
||||||
qemu-nbd --disconnect /dev/nbd$nbd_index
|
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
|
fi
|
||||||
$install_dir/umount_disk.sh
|
$install_dir/umount_disk.sh
|
||||||
systemctl start $app
|
systemctl start $app
|
||||||
|
@ -65,7 +65,7 @@ ask:
|
||||||
$status"
|
$status"
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
if [[ "$(echo \"$status\" | grep \"FAILED NODES\")" ]] || [[ "$(echo \"$status\" | grep 'garage layout show')" ]]
|
if echo "$status" | grep -q "FAILED NODES\|garage layout show"
|
||||||
then
|
then
|
||||||
cat << EOF
|
cat << EOF
|
||||||
style: "danger"
|
style: "danger"
|
||||||
|
|
Loading…
Add table
Reference in a new issue