mirror of
https://github.com/YunoHost-Apps/influxdb_v2_ynh.git
synced 2024-09-03 19:26:11 +02:00
Merge pull request #5 from YunoHost-Apps/3-impossible-to-use-infinite-rentention
Add "0" as a valid choice
This commit is contained in:
commit
3910af662c
1 changed files with 2 additions and 2 deletions
|
@ -16,8 +16,8 @@ source /usr/share/yunohost/helpers
|
||||||
influxdb_admin_token=$(ynh_string_random --length=64 --filter='A-Za-z0-9-_')
|
influxdb_admin_token=$(ynh_string_random --length=64 --filter='A-Za-z0-9-_')
|
||||||
|
|
||||||
# Check if the retention value is valid
|
# Check if the retention value is valid
|
||||||
if ! echo "$influxdb_bucket_retention" | grep -qE '^[0-9]+(ns|u|µ|ms|s|m|h|d|w)$'; then
|
if ! echo "$influxdb_bucket_retention" | grep -qE '^(0|[0-9]+(ns|u|µ|ms|s|m|h|d|w))$'; then
|
||||||
ynh_die --message="Invalid retention value. It should be a number followed by a duration unit (ns, u, µ, ms, s, m, h, d, w)."
|
ynh_die --message="Invalid retention value. It should be either 0 (infinite) or a number followed by a duration unit (ns, u, µ, ms, s, m, h, d, w)."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
ynh_app_setting_set --app=$app --key=influxdb_org_name --value=$influxdb_org_name
|
ynh_app_setting_set --app=$app --key=influxdb_org_name --value=$influxdb_org_name
|
||||||
|
|
Loading…
Reference in a new issue