mirror of
https://github.com/YunoHost-Apps/overleaf_ynh.git
synced 2024-09-03 19:56:27 +02:00
cleanup
This commit is contained in:
parent
ce7343dad4
commit
0f397b4d6c
4 changed files with 11 additions and 14 deletions
|
@ -123,15 +123,13 @@ 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/"
|
||||||
cp -r "$install_dir/build/services/" "$install_dir/live/services/"
|
cp -r "$install_dir/build/services/" "$install_dir/live/services/"
|
||||||
cp -r "$install_dir/build/patches/" "$install_dir/live/patches/"
|
cp -r "$install_dir/build/patches/" "$install_dir/live/patches/"
|
||||||
|
cp -r "$install_dir/build/server-ce/config" "$install_dir/config/"
|
||||||
|
ynh_secure_remove --file="$install_dir/config/settings.js"
|
||||||
|
|
||||||
ynh_add_config --template="../conf/production.json" --destination="$install_dir/build/server-ce/config/production.json"
|
ynh_add_config --template="../conf/production.json" --destination="$install_dir/build/server-ce/config/production.json"
|
||||||
cp -r "$install_dir/build/server-ce/config" "$install_dir/config/"
|
ynh_add_config --template="../conf/production.json" --destination="$install_dir/live/services/history-v1/config/production.json"
|
||||||
cp -r "$install_dir/build/server-ce/config/" "$install_dir/live/services/history-v1/config/"
|
cp "$install_dir/build/server-ce/config/custom-environment-variables.json" "$install_dir/live/services/history-v1/config/"
|
||||||
|
|
||||||
ynh_store_file_checksum --file="$install_dir/config/production.json"
|
|
||||||
ynh_store_file_checksum --file="$install_dir/live/services/history-v1/config/production.json"
|
|
||||||
|
|
||||||
ynh_secure_remove --file="$install_dir/config/settings.js"
|
|
||||||
ynh_secure_remove --file="$install_dir/build"
|
ynh_secure_remove --file="$install_dir/build"
|
||||||
|
|
||||||
ynh_script_progression --message="Building app..."
|
ynh_script_progression --message="Building app..."
|
||||||
|
|
|
@ -111,7 +111,6 @@ ynh_script_progression --message="Removing the MongoDB database..."
|
||||||
# Remove a database if it exists, along with the associated user
|
# Remove a database if it exists, along with the associated user
|
||||||
ynh_mongo_remove_db --db_user=$db_user --db_name=$db_name
|
ynh_mongo_remove_db --db_user=$db_user --db_name=$db_name
|
||||||
|
|
||||||
ynh_replace_string --match_string="engine: wiredTiger" --replace_string="# engine:" --target_file="/etc/mongod.conf"
|
|
||||||
ynh_replace_string --match_string="replication:" --replace_string="#replication:" --target_file="/etc/mongod.conf"
|
ynh_replace_string --match_string="replication:" --replace_string="#replication:" --target_file="/etc/mongod.conf"
|
||||||
ynh_replace_string --match_string=" replSetName: rs0" --replace_string="" --target_file="/etc/mongod.conf"
|
ynh_replace_string --match_string=" replSetName: rs0" --replace_string="" --target_file="/etc/mongod.conf"
|
||||||
|
|
||||||
|
|
|
@ -37,7 +37,6 @@ 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="#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
|
||||||
|
|
|
@ -57,7 +57,6 @@ ynh_script_progression --message="Ensuring downward compatibility..."
|
||||||
#=================================================
|
#=================================================
|
||||||
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="#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
|
||||||
|
@ -123,17 +122,19 @@ 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/"
|
||||||
cp -r "$install_dir/build/services/" "$install_dir/live/services/"
|
cp -r "$install_dir/build/services/" "$install_dir/live/services/"
|
||||||
cp -r "$install_dir/build/patches/" "$install_dir/live/patches/"
|
cp -r "$install_dir/build/patches/" "$install_dir/live/patches/"
|
||||||
|
cp -r "$install_dir/build/server-ce/config" "$install_dir/config/"
|
||||||
|
ynh_secure_remove --file="$install_dir/config/settings.js"
|
||||||
|
|
||||||
ynh_add_config --template="../conf/production.json" --destination="$install_dir/build/server-ce/config/production.json"
|
ynh_add_config --template="../conf/production.json" --destination="$install_dir/build/server-ce/config/production.json"
|
||||||
cp -r "$install_dir/build/server-ce/config/" "$install_dir/config/"
|
ynh_add_config --template="../conf/production.json" --destination="$install_dir/live/services/history-v1/config/production.json"
|
||||||
cp -r "$install_dir/build/server-ce/config/" "$install_dir/live/services/history-v1/config/"
|
cp "$install_dir/build/server-ce/config/custom-environment-variables.json" "$install_dir/live/services/history-v1/config/"
|
||||||
|
|
||||||
ynh_secure_remove --file="$install_dir/build"
|
|
||||||
|
|
||||||
ynh_script_progression --message="Building app..."
|
ynh_script_progression --message="Building app..."
|
||||||
pushd "$install_dir/live"
|
pushd "$install_dir/live"
|
||||||
|
|
Loading…
Reference in a new issue