mirror of
https://github.com/YunoHost-Apps/readeck_ynh.git
synced 2024-09-03 20:16:18 +02:00
fix
This commit is contained in:
parent
823bc7842b
commit
51f0c5cc39
3 changed files with 20 additions and 4 deletions
|
@ -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"
|
|
@ -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)
|
||||||
|
|
|
@ -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
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
Loading…
Add table
Reference in a new issue