From c8b0977c25f57c6f3fc634087be6c9f2a8a10253 Mon Sep 17 00:00:00 2001 From: Jules Bertholet Date: Sat, 20 Mar 2021 10:55:27 -0400 Subject: [PATCH] Don't overwrite config file on upgrade --- conf/nitter.conf | 4 ++-- scripts/upgrade | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/conf/nitter.conf b/conf/nitter.conf index 29c9812..a3a29cc 100644 --- a/conf/nitter.conf +++ b/conf/nitter.conf @@ -1,6 +1,6 @@ [Server] address = "0.0.0.0" -port = "__PORT__" +port = __PORT__ https = false # disable to enable cookies when not using https staticDir = "./public" title = "__TITLE__" @@ -21,7 +21,7 @@ redisMaxConnections = 30 hmacKey = "__HMAC_KEY__" # random key for cryptographic signing of video urls base64Media = false # use base64 encoding for proxied media urls 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. # 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 diff --git a/scripts/upgrade b/scripts/upgrade index 73bc110..a5b23b6 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -76,7 +76,9 @@ then arch=$(ynh_detect_arch) # 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" + 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" fi