1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/overleaf_ynh.git synced 2024-09-03 19:56:27 +02:00

push ercig’s suggestion

This commit is contained in:
Thomas 2024-01-11 13:14:26 +01:00 committed by GitHub
parent fe8621906c
commit c9bbe2893c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 19 additions and 20 deletions

View file

@ -55,10 +55,10 @@ ram.runtime = "50M"
sha256 = "29654ef5d641dd3df503df4b6aeb6f9b00a2407886c447d82fc2d25a9026b566" sha256 = "29654ef5d641dd3df503df4b6aeb6f9b00a2407886c447d82fc2d25a9026b566"
[resources.sources.ldap] #[resources.sources.ldap]
url = "https://github.com/smhaller/ldap-overleaf-sl/archive/refs/tags/4.1.1.tar.gz" # url = "https://github.com/smhaller/ldap-overleaf-sl/archive/refs/tags/4.1.1.tar.gz"
sha256 = "6c9124f0f8a5d5bbccc271d3b29bb7c8ecb1e6362d5725316638a6c098095aea" #sha256 = "6c9124f0f8a5d5bbccc271d3b29bb7c8ecb1e6362d5725316638a6c098095aea"
autoupdate.strategy = "latest_github_tag" #autoupdate.strategy = "latest_github_tag"
[resources.system_user] [resources.system_user]
@ -67,6 +67,7 @@ ram.runtime = "50M"
[resources.install_dir] [resources.install_dir]
[resources.data_dir] [resources.data_dir]
subdirs = ["compiles", "output", "cache"]
[resources.permissions] [resources.permissions]
main.url = "/" main.url = "/"

View file

@ -66,8 +66,6 @@ ynh_add_nginx_config
#================================================= #=================================================
ynh_script_progression --message="Creating a data directory..." ynh_script_progression --message="Creating a data directory..."
mkdir -p $data_dir/{compiles,output,cache}
chmod 750 "$data_dir" chmod 750 "$data_dir"
chmod -R o-rwx "$data_dir" chmod -R o-rwx "$data_dir"
chown -R $app:www-data "$data_dir" chown -R $app:www-data "$data_dir"

View file

@ -51,7 +51,7 @@ then
# Download, check integrity, uncompress and patch the source from app.src # 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"
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 fi
chmod 750 "$install_dir" chmod 750 "$install_dir"
@ -113,21 +113,21 @@ then
ynh_secure_remove --file="$install_dir/config/settings.js" 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/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" # 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 '/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 "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 '/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
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/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/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" # 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" # 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" # 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"
ynh_secure_remove --file="$install_dir/build_ldap" # ynh_secure_remove --file="$install_dir/build_ldap"
pushd "$install_dir/live" pushd "$install_dir/live"
ynh_use_nodejs ynh_use_nodejs