From 300a1469af1a19c72ec9c0068de3fa80826f6f95 Mon Sep 17 00:00:00 2001 From: denis Date: Thu, 7 Nov 2024 04:33:47 -0500 Subject: [PATCH] Update scripts/upgrade --- scripts/upgrade | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index 957e129..d9c815b 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -70,13 +70,14 @@ ynh_script_progression "Updating $app's configuration files..." ### The file will automatically be backed-up if it's found to be manually modified (because ### ynh_config_add keeps track of the file's checksum) -ynh_config_add --template="some_config_file" --destination="$install_dir/some_config_file" +ynh_config_add --template="run.sh" --destination="$install_dir/run.sh" # FIXME: this should be handled by the core in the future ### You may need to use chmod 600 instead of 400, ### for example if the app is expected to be able to modify its own config -chmod 400 "$install_dir/some_config_file" -chown "$app:$app" "$install_dir/some_config_file" +chmod +x "$install_dir/run.sh" +chmod 400 "$install_dir/run.sh" +chown "$app:$app" "$install_dir/run.sh" ### For more complex cases where you want to replace stuff using regexes, ### you shoud rely on ynh_replace (which is basically a wrapper for sed) @@ -92,18 +93,14 @@ ynh_script_progression "Upgrading system configurations related to $app..." ### This should be a literal copypaste of what happened in the install's "System configuration" section -ynh_config_add_phpfpm - ynh_config_add_nginx ynh_config_add_systemd -yunohost service add "$app" --description="A short description of the app" --log="/var/log/$app/$app.log" +yunohost service add "$app" --description="A modern and self-hosted take on file uploading services that can handle anything you throw at it thanks to it's robust and fast API, chunked uploads support and more." --log="/var/log/$app/$app.log" ynh_config_add_logrotate -ynh_config_add_fail2ban --logpath="/var/log/nginx/${domain}-error.log" --failregex="Regex to match into the log for a failed login" - #================================================= # START SYSTEMD SERVICE #=================================================