1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/thelounge_ynh.git synced 2024-09-03 20:35:54 +02:00
This commit is contained in:
ericgaspar 2021-08-30 22:37:35 +02:00
parent 76098b5cab
commit 92c8965523
No known key found for this signature in database
GPG key ID: 574F281483054D44
4 changed files with 9 additions and 19 deletions

View file

@ -12,7 +12,7 @@
setup_private=1
setup_public=1
upgrade=1
upgrade=1 from_commit=bd00c8e3ce43563f33fde073cf36b997c348d05c
#upgrade=1 from_commit=bd00c8e3ce43563f33fde073cf36b997c348d05c
backup_restore=1
multi_instance=0
change_url=1

View file

@ -156,7 +156,7 @@ yunohost service add $app --description="Client Web IRC" --log="/var/log/$app/$a
ynh_script_progression --message="Starting a systemd service..."
# Start a systemd service
ynh_systemd_action --service_name=$app --action=start --log_path=systemd #--line_match="Available at http"
ynh_systemd_action --service_name=$app --action=start --log_path=systemd
#=================================================
# SETUP SSOWAT

View file

@ -113,7 +113,7 @@ yunohost service add $app --description="Client Web IRC" --log="/var/log/$app/$a
#=================================================
ynh_script_progression --message="Starting a systemd service..."
ynh_systemd_action --service_name=$app --action=start --log_path=systemd #--line_match="Available at http"
ynh_systemd_action --service_name=$app --action=start --log_path=systemd
#=================================================
# GENERIC FINALIZATION

View file

@ -94,10 +94,9 @@ if [ "$upgrade_type" == "UPGRADE_APP" ]
then
ynh_script_progression --message="Upgrading source files..."
ynh_secure_remove --file=$final_path
ynh_secure_remove --file="$final_path"
# Download, check integrity, uncompress and patch the source from app.src
ynh_setup_source --dest_dir="$final_path"
ynh_setup_source --dest_dir=$final_path
fi
chmod 750 "$final_path"
@ -132,29 +131,20 @@ ynh_install_extra_app_dependencies --repo="deb https://dl.yarnpkg.com/debian/ st
if [ "$upgrade_type" == "UPGRADE_APP" ]
then
ynh_script_progression --message="Upgrading the lounge..."
pushd $final_path
ynh_use_nodejs
ynh_exec_warn_less NODE_ENV=production yarn install
ynh_use_nodejs
ynh_exec_warn_less NODE_ENV=production yarn install
yarn add webpack webpack-dev-server --dev
ynh_exec_warn_less NODE_ENV=production yarn build
popd
fi
#=================================================
# MODIFY A CONFIG FILE
#=================================================
ynh_script_progression --message="Modifying a config file..."
ynh_add_config --template="../conf/config.js" --destination="$config_path/config.js"
#=================================================
# SETUP SYSTEMD
#=================================================
ynh_script_progression --message="Upgrading systemd configuration..."
ynh_replace_string --match_string="__ENV_PATH__" --replace_string="$PATH" --target_file="../conf/systemd.service"
ynh_replace_string --match_string="__NODE__" --replace_string="$nodejs_path" --target_file="../conf/systemd.service"
ynh_add_systemd_config
#=================================================
@ -171,7 +161,7 @@ yunohost service add $app --description="Client Web IRC" --log="/var/log/$app/$a
#=================================================
ynh_script_progression --message="Starting a systemd service..."
ynh_systemd_action --service_name=$app --action=start --log_path=systemd #--line_match="Available at http"
ynh_systemd_action --service_name=$app --action=start --log_path=systemd
#=================================================
# RELOAD NGINX