1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/readeck_ynh.git synced 2024-09-03 20:16:18 +02:00
This commit is contained in:
ericgaspar 2024-06-09 08:16:18 +02:00
parent 823bc7842b
commit 51f0c5cc39
3 changed files with 20 additions and 4 deletions

View file

@ -10,8 +10,6 @@ services = ["__APP__"]
[main.configuration.link] [main.configuration.link]
ask = "Public link sharing time" ask = "Public link sharing time"
type = "boolean" type = "number"
yes = "true" help = "Indicate the public link sharing time in hours"
no = "false"
help = "Public link sharing time in hours"
bind = "public_share_ttl:__DATA_DIR__/config.toml" bind = "public_share_ttl:__DATA_DIR__/config.toml"

View file

@ -14,7 +14,9 @@ source /usr/share/yunohost/helpers
#================================================= #=================================================
key=$(ynh_string_random --length=50) key=$(ynh_string_random --length=50)
public_share_ttl="48" public_share_ttl="48"
ynh_app_setting_set --app=$app --key=public_share_ttl --value=$public_share_ttl
#================================================= #=================================================
# APP "BUILD" (DEPLOYING SOURCES, VENV, COMPILING ETC) # APP "BUILD" (DEPLOYING SOURCES, VENV, COMPILING ETC)

View file

@ -9,6 +9,22 @@
source _common.sh source _common.sh
source /usr/share/yunohost/helpers source /usr/share/yunohost/helpers
#=================================================
# ENSURE DOWNWARD COMPATIBILITY
#=================================================
ynh_script_progression --message="Ensuring downward compatibility..." --weight=1
if [ -z "${public_share_ttl:-}" ]; then
public_share_ttl="48"
ynh_app_setting_set --app="$app" --key=public_share_ttl --value=$public_share_ttl
fi
if [ -z "${key:-}" ]; then
key=$(ynh_string_random --length=50)
ynh_app_setting_set --app="$app" --key=key --value=$key
fi
#================================================= #=================================================
# STOP SYSTEMD SERVICE # STOP SYSTEMD SERVICE
#================================================= #=================================================