From c9bbe2893c568c933c6f0d9e895565a700c7ef2f Mon Sep 17 00:00:00 2001 From: Thomas <51749973+Thovi98@users.noreply.github.com> Date: Thu, 11 Jan 2024 13:14:26 +0100 Subject: [PATCH] =?UTF-8?q?push=20ercig=E2=80=99s=20suggestion?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- manifest.toml | 9 +++++---- scripts/install | 2 -- scripts/upgrade | 28 ++++++++++++++-------------- 3 files changed, 19 insertions(+), 20 deletions(-) diff --git a/manifest.toml b/manifest.toml index c2b13d8..d2fa8a1 100644 --- a/manifest.toml +++ b/manifest.toml @@ -55,10 +55,10 @@ ram.runtime = "50M" sha256 = "29654ef5d641dd3df503df4b6aeb6f9b00a2407886c447d82fc2d25a9026b566" - [resources.sources.ldap] - url = "https://github.com/smhaller/ldap-overleaf-sl/archive/refs/tags/4.1.1.tar.gz" - sha256 = "6c9124f0f8a5d5bbccc271d3b29bb7c8ecb1e6362d5725316638a6c098095aea" - autoupdate.strategy = "latest_github_tag" + #[resources.sources.ldap] + # url = "https://github.com/smhaller/ldap-overleaf-sl/archive/refs/tags/4.1.1.tar.gz" + #sha256 = "6c9124f0f8a5d5bbccc271d3b29bb7c8ecb1e6362d5725316638a6c098095aea" + #autoupdate.strategy = "latest_github_tag" [resources.system_user] @@ -67,6 +67,7 @@ ram.runtime = "50M" [resources.install_dir] [resources.data_dir] + subdirs = ["compiles", "output", "cache"] [resources.permissions] main.url = "/" diff --git a/scripts/install b/scripts/install index 5e9dcde..a6b049a 100755 --- a/scripts/install +++ b/scripts/install @@ -66,8 +66,6 @@ ynh_add_nginx_config #================================================= ynh_script_progression --message="Creating a data directory..." -mkdir -p $data_dir/{compiles,output,cache} - chmod 750 "$data_dir" chmod -R o-rwx "$data_dir" chown -R $app:www-data "$data_dir" diff --git a/scripts/upgrade b/scripts/upgrade index 3cf7b48..7b6df54 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -51,7 +51,7 @@ then # Download, check integrity, uncompress and patch the source from app.src ynh_setup_source --dest_dir="$install_dir/build" - ynh_setup_source --dest_dir="$install_dir/build_ldap" --source_id="ldap" + #ynh_setup_source --dest_dir="$install_dir/build_ldap" --source_id="ldap" fi chmod 750 "$install_dir" @@ -113,21 +113,21 @@ then ynh_secure_remove --file="$install_dir/config/settings.js" - cp "$install_dir/build_ldap/ldap-overleaf-sl/sharelatex/AuthenticationManager.js" "$install_dir/live/services/web/app/src/Features/Authentication/AuthenticationManager.js" - cp "$install_dir/build_ldap/ldap-overleaf-sl/sharelatex/ContactController.js" "$install_dir/live/services/web/app/src/Features/Contacts/ContactController.js" - #sed -iE '/type=.*email.*/d' $install_dir/live/services/web/app/views/user/login.pug - #sed -iE "s/email@example.com/${login_text:-user}/g" $install_dir/live/services/web/app/views/user/login.pug - #sed -iE '/email@example.com/{n;N;N;d}' $install_dir/live/services/web/app/views/user/login.pug - sed -iE "s%-synctex=1\",%-synctex=1\", \"-shell-escape\",%g" $install_dir/live/services/clsi/app/js/LatexRunner.js - sed -iE "s%'-synctex=1',%'-synctex=1', '-shell-escape',%g" $install_dir/live/services/clsi/app/js/LatexRunner.js - cp "$install_dir/build_ldap/ldap-overleaf-sl/sharelatex/settings.pug" "$install_dir/live/services/web/app/views/user/settings.pug" - cp "$install_dir/build_ldap/ldap-overleaf-sl/sharelatex/navbar.pug" "$install_dir/live/services/web/app/views/layout/navbar.pug" - cp "$install_dir/build_ldap/ldap-overleaf-sl/sharelatex/admin-sysadmin.pug" "$install_dir/live/services/web/app/views/admin/index.pug" - ynh_secure_remove --file="$install_dir/live/services/web/app/views/project/editor/review-panel.pug" - touch "$install_dir/live/services/web/app/views/project/editor/review-panel.pug" +# cp "$install_dir/build_ldap/ldap-overleaf-sl/sharelatex/AuthenticationManager.js" "$install_dir/live/services/web/app/src/Features/Authentication/AuthenticationManager.js" +# cp "$install_dir/build_ldap/ldap-overleaf-sl/sharelatex/ContactController.js" "$install_dir/live/services/web/app/src/Features/Contacts/ContactController.js" +# #sed -iE '/type=.*email.*/d' $install_dir/live/services/web/app/views/user/login.pug +# #sed -iE "s/email@example.com/${login_text:-user}/g" $install_dir/live/services/web/app/views/user/login.pug +# #sed -iE '/email@example.com/{n;N;N;d}' $install_dir/live/services/web/app/views/user/login.pug +# sed -iE "s%-synctex=1\",%-synctex=1\", \"-shell-escape\",%g" $install_dir/live/services/clsi/app/js/LatexRunner.js +# sed -iE "s%'-synctex=1',%'-synctex=1', '-shell-escape',%g" $install_dir/live/services/clsi/app/js/LatexRunner.js +# cp "$install_dir/build_ldap/ldap-overleaf-sl/sharelatex/settings.pug" "$install_dir/live/services/web/app/views/user/settings.pug" +# cp "$install_dir/build_ldap/ldap-overleaf-sl/sharelatex/navbar.pug" "$install_dir/live/services/web/app/views/layout/navbar.pug" +# cp "$install_dir/build_ldap/ldap-overleaf-sl/sharelatex/admin-sysadmin.pug" "$install_dir/live/services/web/app/views/admin/index.pug" +# ynh_secure_remove --file="$install_dir/live/services/web/app/views/project/editor/review-panel.pug" +# touch "$install_dir/live/services/web/app/views/project/editor/review-panel.pug" ynh_secure_remove --file="$install_dir/build" - ynh_secure_remove --file="$install_dir/build_ldap" +# ynh_secure_remove --file="$install_dir/build_ldap" pushd "$install_dir/live" ynh_use_nodejs