From 45bd8b5c2b410cd1b6e4d0ae29bae52e891a6598 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Thu, 27 Jan 2022 21:05:27 +0100 Subject: [PATCH] Apply last example_ynh --- .gitignore | 4 ---- check_process | 8 ++++---- conf/nginx.conf | 5 ----- doc/DESCRIPTION.md | 1 + doc/DISCLAIMER.md | 3 +-- manifest.json | 4 ++-- scripts/backup | 1 - scripts/change_url | 1 + scripts/install | 14 ++++++++------ scripts/remove | 28 ++++++++++++++++++++-------- scripts/restore | 5 +---- scripts/upgrade | 21 ++++++++++----------- 12 files changed, 48 insertions(+), 47 deletions(-) delete mode 100644 .gitignore create mode 100644 doc/DESCRIPTION.md diff --git a/.gitignore b/.gitignore deleted file mode 100644 index 05240a3..0000000 --- a/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -*~ -*.sw[op] -@ -.idea diff --git a/check_process b/check_process index 4c840ad..9e5a7e7 100644 --- a/check_process +++ b/check_process @@ -15,7 +15,8 @@ setup_private=1 setup_public=1 upgrade=1 - #upgrade=1 from_commit=CommitHash + # 0.6.2~ynh9 + upgrade=1 from_commit=a2d626f966bc358aea53bbe78d9fa2a0e3783c78 backup_restore=1 multi_instance=1 port_already_use=0 @@ -24,6 +25,5 @@ Email= Notification=none ;;; Upgrade options - ; commit=CommitHash - name=Name and date of the commit. - manifest_arg=domain=DOMAIN&path=PATH&admin=USER&language=fr&is_public=1&password=pass&port=666& + ; commit=a2d626f966bc358aea53bbe78d9fa2a0e3783c78 + name=0.6.2~ynh9 diff --git a/conf/nginx.conf b/conf/nginx.conf index ce46a28..c892c68 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -1,10 +1,5 @@ location __PATH__/ { - # Force usage of https - if ($scheme = http) { - rewrite ^ https://$server_name$request_uri? permanent; - } - proxy_set_header Accept-Encoding ""; try_files $uri @proxy; diff --git a/doc/DESCRIPTION.md b/doc/DESCRIPTION.md new file mode 100644 index 0000000..c7ec872 --- /dev/null +++ b/doc/DESCRIPTION.md @@ -0,0 +1 @@ +Archiving solution to collect, save, and view sites you want to preserve offline diff --git a/doc/DISCLAIMER.md b/doc/DISCLAIMER.md index 4c28be1..0c11cc8 100644 --- a/doc/DISCLAIMER.md +++ b/doc/DISCLAIMER.md @@ -1,5 +1,4 @@ * Any known limitations, constrains or stuff not working: * required to be run at the base path / , subpaths not yet supported * currently only tested on amd64 - * haven't yet implemented single-sign or LDAP integration - + * haven't yet implemented single-sign or LDAP integration diff --git a/manifest.json b/manifest.json index fd9584e..dc74685 100644 --- a/manifest.json +++ b/manifest.json @@ -21,14 +21,14 @@ "email": "max@mfowler.info" }, "requirements": { - "yunohost": ">= 4.1.7" + "yunohost": ">= 4.3.0" }, "multi_instance": true, "services": [ "nginx" ], "arguments": { - "install" : [ + "install": [ { "name": "domain", "type": "domain" diff --git a/scripts/backup b/scripts/backup index 4ba0b55..67278fd 100755 --- a/scripts/backup +++ b/scripts/backup @@ -15,7 +15,6 @@ source /usr/share/yunohost/helpers #================================================= ynh_clean_setup () { - ### Remove this function if there's nothing to clean before calling the remove script. true } # Exit if an error occurs during the execution of the script diff --git a/scripts/change_url b/scripts/change_url index c6ac688..34cd5a5 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -109,6 +109,7 @@ fi #================================================= ynh_script_progression --message="Starting a systemd service..." --weight=1 +# Start a systemd service ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$app/$app.log" #================================================= diff --git a/scripts/install b/scripts/install index 3765873..892c527 100755 --- a/scripts/install +++ b/scripts/install @@ -14,7 +14,6 @@ source /usr/share/yunohost/helpers #================================================= ynh_clean_setup () { - ### Remove this function if there's nothing to clean before calling the remove script. true } # Exit if an error occurs during the execution of the script @@ -137,9 +136,13 @@ archivebox_cmd="$final_path/venv/bin/archivebox" #================================================= # INSTALL NODE DEPENDENCIES #================================================= +ynh_script_progression --message="Install node dependencies..." + cp ../conf/package.json "$final_path/package.json" cp ../conf/package-lock.json "$final_path/package-lock.json" -cd $final_path; ynh_npm ci +pushd $final_path + ynh_npm ci +popd ynh_node_path=$ynh_node @@ -153,7 +156,6 @@ ynh_app_setting_set --app=$app --key=datadir --value=$datadir mkdir -p $datadir -# permissions chmod 750 "$datadir" chmod -R o-rwx "$datadir" chown -R $app:www-data "$datadir" @@ -183,7 +185,7 @@ ynh_script_progression --message="Found users: $USER_EXISTS" --weight=1 if [ $USER_EXISTS -eq 1 ] then - ynh_script_progression --message="User already exists: setting admin password" --weight=1 + ynh_script_progression --message="User already exists: setting admin password" --weight=1 ynh_exec_as $app /usr/bin/expect<