From 506a4943b16a8ad2dc5c7183ead0f72b5739c55b Mon Sep 17 00:00:00 2001 From: yalh76 Date: Sun, 13 Oct 2019 14:52:23 +0200 Subject: [PATCH] typo --- conf/local-production.json | 2 ++ conf/production.yaml | 36 ++++++++++++++++++------------------ scripts/install | 13 ++++++++----- scripts/upgrade | 10 +++++----- 4 files changed, 33 insertions(+), 28 deletions(-) create mode 100644 conf/local-production.json diff --git a/conf/local-production.json b/conf/local-production.json new file mode 100644 index 0000000..2c63c08 --- /dev/null +++ b/conf/local-production.json @@ -0,0 +1,2 @@ +{ +} diff --git a/conf/production.yaml b/conf/production.yaml index b86bcb4..52e9c12 100644 --- a/conf/production.yaml +++ b/conf/production.yaml @@ -5,7 +5,7 @@ listen: # Correspond to your reverse proxy server_name/listen configuration webserver: https: true - hostname: '__domain__' + hostname: '__DOMAIN__' port: 443 rates_limit: @@ -36,9 +36,9 @@ trust_proxy: database: hostname: 'localhost' port: 5432 - suffix: '___db_name__' - username: '__db_name__' - password: '__db_pwd__' + suffix: '___DB_NAME__' + username: '__DB_NAME__' + password: '__DB_PWD__' pool: max: 5 @@ -60,7 +60,7 @@ smtp: tls: false # If you use StartTLS: false disable_starttls: true ca_file: null # Used for self signed certificates - from_address: 'webmaster@__domain__' + from_address: 'webmaster@__DOMAIN__' email: body: @@ -70,18 +70,18 @@ email: # From the project root directory storage: - tmp: '/home/yunohost.app/__app__/storage/tmp/' # Use to download data (imports etc), store uploaded files before processing... - avatars: '/home/yunohost.app/__app__/storage/avatars/' - videos: '/home/yunohost.app/__app__/storage/videos/' - streaming_playlists: '/home/yunohost.app/__app__/storage/streaming-playlists/' - redundancy: '/home/yunohost.app/__app__/storage/videos/' - logs: '/home/yunohost.app/__app__/storage/logs/' - previews: '/home/yunohost.app/__app__/storage/previews/' - thumbnails: '/home/yunohost.app/__app__/storage/thumbnails/' - torrents: '/home/yunohost.app/__app__/storage/torrents/' - captions: '/home/yunohost.app/__app__/storage/captions/' - cache: '/home/yunohost.app/__app__/storage/cache/' - plugins: '/home/yunohost.app/__app__/storage/plugins/' + tmp: '/home/yunohost.app/__APP__/storage/tmp/' # Use to download data (imports etc), store uploaded files before processing... + avatars: '/home/yunohost.app/__APP__/storage/avatars/' + videos: '/home/yunohost.app/__APP__/storage/videos/' + streaming_playlists: '/home/yunohost.app/__APP__/storage/streaming-playlists/' + redundancy: '/home/yunohost.app/__APP__/storage/videos/' + logs: '/home/yunohost.app/__APP__/storage/logs/' + previews: '/home/yunohost.app/__APP__/storage/previews/' + thumbnails: '/home/yunohost.app/__APP__/storage/thumbnails/' + torrents: '/home/yunohost.app/__APP__/storage/torrents/' + captions: '/home/yunohost.app/__APP__/storage/captions/' + cache: '/home/yunohost.app/__APP__/storage/cache/' + plugins: '/home/yunohost.app/__APP__/storage/plugins/' log: level: 'info' # debug/info/warning/error @@ -186,7 +186,7 @@ cache: admin: # Used to generate the root user at first startup # And to receive emails from the contact form - email: '__email__' + email: '__EMAIL__' contact_form: enabled: true diff --git a/scripts/install b/scripts/install index 6944354..482ab7a 100644 --- a/scripts/install +++ b/scripts/install @@ -148,13 +148,16 @@ chown -R "$app":"$app" "$datadir" #================================================= cp ../conf/production.yaml "$final_path/config/production.yaml" -ynh_replace_string --match_string="__domain__" --replace_string="$domain" --target_file="$final_path/config/production.yaml" -ynh_replace_string --match_string="__db_name__" --replace_string="$app" --target_file="$final_path/config/production.yaml" -ynh_replace_string --match_string="__app__" --replace_string="$app" --target_file="$final_path/config/production.yaml" -ynh_replace_string --match_string="__db_pwd__" --replace_string="$db_pwd" --target_file="$final_path/config/production.yaml" -ynh_replace_string --match_string="__email__" --replace_string="$admin_email" --target_file="$final_path/config/production.yaml" +ynh_replace_string --match_string="__DOMAIN__" --replace_string="$domain" --target_file="$final_path/config/production.yaml" +ynh_replace_string --match_string="__DB_NAME__" --replace_string="$app" --target_file="$final_path/config/production.yaml" +ynh_replace_string --match_string="__APP__" --replace_string="$app" --target_file="$final_path/config/production.yaml" +ynh_replace_string --match_string="__DB_PWD__" --replace_string="$db_pwd" --target_file="$final_path/config/production.yaml" +ynh_replace_string --match_string="__EMAIL__" --replace_string="$admin_email" --target_file="$final_path/config/production.yaml" ynh_replace_string --match_string="__PORT__" --replace_string="$port" --target_file="$final_path/config/production.yaml" +#Create the admin settings file +cp ../conf/local-production.json "$final_path/config/local-production.json" + #================================================= # FIX NGINX DOMAIN CONFIGURATION #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index eb3bf14..8b67fb5 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -167,11 +167,11 @@ ynh_backup_if_checksum_is_different --file="$final_path/config/local-production. ynh_backup_if_checksum_is_different --file="$final_path/config/production.yaml" cp ../conf/production.yaml "$final_path/config/production.yaml" -ynh_replace_string --match_string="__domain__" --replace_string="$domain" --target_file="$final_path/config/production.yaml" -ynh_replace_string --match_string="__db_name__" --replace_string="$app" --target_file="$final_path/config/production.yaml" -ynh_replace_string --match_string="__app__" --replace_string="$app" --target_file="$final_path/config/production.yaml" -ynh_replace_string --match_string="__db_pwd__" --replace_string="$db_pwd" --target_file="$final_path/config/production.yaml" -ynh_replace_string --match_string="__email__" --replace_string="$admin_email" --target_file="$final_path/config/production.yaml" +ynh_replace_string --match_string="__DOMAIN__" --replace_string="$domain" --target_file="$final_path/config/production.yaml" +ynh_replace_string --match_string="__DB_NAME__" --replace_string="$app" --target_file="$final_path/config/production.yaml" +ynh_replace_string --match_string="__APP__" --replace_string="$app" --target_file="$final_path/config/production.yaml" +ynh_replace_string --match_string="__DB_PWD__" --replace_string="$db_pwd" --target_file="$final_path/config/production.yaml" +ynh_replace_string --match_string="__EMAIL__" --replace_string="$admin_email" --target_file="$final_path/config/production.yaml" ynh_replace_string --match_string="__PORT__" --replace_string="$port" --target_file="$final_path/config/production.yaml" # Recalculate and store the checksum of the file for the next upgrade.