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

some cleanup

This commit is contained in:
Thomas 2024-02-20 19:14:24 +01:00 committed by GitHub
parent 4407bb991d
commit ce7343dad4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 11 additions and 10 deletions

View file

@ -17,4 +17,4 @@ Restart=on-failure
RestartSec=5s
[Install]
WantedBy=multi-user.target
WantedBy=multi-user.target

View file

@ -53,7 +53,7 @@ const settings = {
brandPrefix: '',
port: __PORT__,
allowAnonymousReadAndWriteSharing:
process.env.SHARELATEX_ALLOW_ANONYMOUS_READ_AND_WRITE_SHARING === 'true',

View file

@ -53,15 +53,15 @@ ynh_mongo_setup_db --db_user=$db_user --db_name=$db_name
#=================================================
ynh_script_progression --message="Configuring MongoDB..." --weight=10
#ynh_replace_string --match_string="# engine:" --replace_string=" engine: wiredTiger" --target_file="/etc/mongod.conf"
#ynh_replace_string --match_string="#replication:" --replace_string="replication:\n replSetName: rs0" --target_file="/etc/mongod.conf"
ynh_replace_string --match_string="# engine:" --replace_string=" engine: wiredTiger" --target_file="/etc/mongod.conf"
ynh_replace_string --match_string="#replication:" --replace_string="replication:\n replSetName: rs0" --target_file="/etc/mongod.conf"
#ynh_exec_warn_less systemctl enable mongod --quiet
#ynh_systemd_action --service_name=mongod --action=restart --log_path=/var/log/mongodb/mongod.log --line_match="Waiting for connections"
ynh_exec_warn_less systemctl enable mongod --quiet
ynh_systemd_action --service_name=mongod --action=restart --log_path=/var/log/mongodb/mongod.log --line_match="Waiting for connections"
#if ynh_exec_warn_less ynh_mongo_exec --command="printjson(rs.status())" | grep -q "no replset config has been received"; then
#ynh_exec_warn_less ynh_mongo_exec --command="printjson(rs.initiate())" --eval
#fi
if ynh_exec_warn_less ynh_mongo_exec --command="printjson(rs.status())" | grep -q "no replset config has been received"; then
ynh_exec_warn_less ynh_mongo_exec --command="printjson(rs.initiate())" --eval
fi
#=================================================
# DOWNLOAD, CHECK AND UNPACK SOURCE
@ -74,7 +74,6 @@ ynh_setup_source --dest_dir="$install_dir/build"
mkdir -p $install_dir/tmp
mkdir -p $install_dir/tmp/{projectHistories,dumpFolder,uploads}
chmod 750 "$install_dir"
chmod -R o-rwx "$install_dir"
chown -R $app:www-data "$install_dir"
@ -117,6 +116,8 @@ chown $app:$app "$install_dir/settings.js"
ynh_script_progression --message="Preparing app..."
mkdir -p "$install_dir/live"
cp "$install_dir/build/server-ce/genScript.js" "$install_dir/live/genScript.js"
cp "$install_dir/build/server-ce/services.js" "$install_dir/live/services.js"
cp "$install_dir/build/package.json" "$install_dir/live/package.json"
cp "$install_dir/build/package-lock.json" "$install_dir/live/package-lock.json"
cp -r "$install_dir/build/libraries/" "$install_dir/live/libraries/"