1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/nitter_ynh.git synced 2024-09-03 19:46:24 +02:00

Don't overwrite config file on upgrade

This commit is contained in:
Jules Bertholet 2021-03-20 10:55:27 -04:00
parent 8a41e76b45
commit c8b0977c25
2 changed files with 4 additions and 2 deletions

View file

@ -1,6 +1,6 @@
[Server] [Server]
address = "0.0.0.0" address = "0.0.0.0"
port = "__PORT__" port = __PORT__
https = false # disable to enable cookies when not using https https = false # disable to enable cookies when not using https
staticDir = "./public" staticDir = "./public"
title = "__TITLE__" title = "__TITLE__"
@ -21,7 +21,7 @@ redisMaxConnections = 30
hmacKey = "__HMAC_KEY__" # random key for cryptographic signing of video urls hmacKey = "__HMAC_KEY__" # random key for cryptographic signing of video urls
base64Media = false # use base64 encoding for proxied media urls base64Media = false # use base64 encoding for proxied media urls
tokenCount = 10 tokenCount = 10
# minimum amount of usabsle tokens. tokens are used to authorize API requests, # minimum amount of usable tokens. tokens are used to authorize API requests,
# but they expire after ~1 hour, and have a limit of 187 requests. # but they expire after ~1 hour, and have a limit of 187 requests.
# the limit gets reset every 15 minutes, and the pool is filled up so there's # the limit gets reset every 15 minutes, and the pool is filled up so there's
# always at least $tokenCount usable tokens. again, only increase this if # always at least $tokenCount usable tokens. again, only increase this if

View file

@ -76,7 +76,9 @@ then
arch=$(ynh_detect_arch) arch=$(ynh_detect_arch)
# Download, check integrity, uncompress and patch the source from app.src # Download, check integrity, uncompress and patch the source from app.src
mv "$final_path/nitter.conf" "$final_path/nitter.conf.bak"
ynh_setup_source --dest_dir="$final_path" ynh_setup_source --dest_dir="$final_path"
mv "$final_path/nitter.conf.bak" "$final_path/nitter.conf"
ynh_setup_source --source_id="nim_$arch" --dest_dir="$final_path/.nim" || ynh_die --message="Your server's architecture is not supported" ynh_setup_source --source_id="nim_$arch" --dest_dir="$final_path/.nim" || ynh_die --message="Your server's architecture is not supported"
fi fi