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:
parent
4407bb991d
commit
ce7343dad4
3 changed files with 11 additions and 10 deletions
|
@ -17,4 +17,4 @@ Restart=on-failure
|
||||||
RestartSec=5s
|
RestartSec=5s
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
|
@ -53,7 +53,7 @@ const settings = {
|
||||||
brandPrefix: '',
|
brandPrefix: '',
|
||||||
|
|
||||||
port: __PORT__,
|
port: __PORT__,
|
||||||
|
|
||||||
allowAnonymousReadAndWriteSharing:
|
allowAnonymousReadAndWriteSharing:
|
||||||
process.env.SHARELATEX_ALLOW_ANONYMOUS_READ_AND_WRITE_SHARING === 'true',
|
process.env.SHARELATEX_ALLOW_ANONYMOUS_READ_AND_WRITE_SHARING === 'true',
|
||||||
|
|
||||||
|
|
|
@ -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_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="# 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="#replication:" --replace_string="replication:\n replSetName: rs0" --target_file="/etc/mongod.conf"
|
||||||
|
|
||||||
#ynh_exec_warn_less systemctl enable mongod --quiet
|
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_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
|
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
|
ynh_exec_warn_less ynh_mongo_exec --command="printjson(rs.initiate())" --eval
|
||||||
#fi
|
fi
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
# 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
|
||||||
mkdir -p $install_dir/tmp/{projectHistories,dumpFolder,uploads}
|
mkdir -p $install_dir/tmp/{projectHistories,dumpFolder,uploads}
|
||||||
|
|
||||||
|
|
||||||
chmod 750 "$install_dir"
|
chmod 750 "$install_dir"
|
||||||
chmod -R o-rwx "$install_dir"
|
chmod -R o-rwx "$install_dir"
|
||||||
chown -R $app:www-data "$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..."
|
ynh_script_progression --message="Preparing app..."
|
||||||
|
|
||||||
mkdir -p "$install_dir/live"
|
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.json" "$install_dir/live/package.json"
|
||||||
cp "$install_dir/build/package-lock.json" "$install_dir/live/package-lock.json"
|
cp "$install_dir/build/package-lock.json" "$install_dir/live/package-lock.json"
|
||||||
cp -r "$install_dir/build/libraries/" "$install_dir/live/libraries/"
|
cp -r "$install_dir/build/libraries/" "$install_dir/live/libraries/"
|
||||||
|
|
Loading…
Reference in a new issue