mirror of
https://github.com/YunoHost-Apps/rocketchat_ynh.git
synced 2024-09-03 20:16:25 +02:00
cleaning
This commit is contained in:
parent
d626e5dd8b
commit
f95ae988ce
5 changed files with 19 additions and 14 deletions
|
@ -30,7 +30,7 @@ ynh_change_url_nginx_config
|
|||
#=================================================
|
||||
ynh_script_progression --message="Updating systemd service..." --weight=1
|
||||
|
||||
ynh_replace_string --match_string="Environment=ROOT_URL=https://$old_domain$old_path" --replace_string="Environment=ROOT_URL=https://$new_domain$new_path" --target_file="/etc/systemd/system/$app.service"
|
||||
ynh_replace_string --match_string="Environment=ROOT_URL=https://$old_domain" --replace_string="Environment=ROOT_URL=https://$new_domain" --target_file="/etc/systemd/system/$app.service"
|
||||
systemctl daemon-reload
|
||||
|
||||
#=================================================
|
||||
|
|
|
@ -73,9 +73,9 @@ if ynh_exec_warn_less ynh_mongo_exec --command="printjson(rs.status())" | grep -
|
|||
fi
|
||||
|
||||
#=================================================
|
||||
# SETUP SYSTEMD
|
||||
# SYSTEM CONFIGURATION
|
||||
#=================================================
|
||||
ynh_script_progression --message="Configuring a systemd service..." --weight=1
|
||||
ynh_script_progression --message="Adding system configurations related to $app..." --weight=1
|
||||
|
||||
# Create a dedicated NGINX config
|
||||
ynh_add_nginx_config
|
||||
|
@ -85,7 +85,7 @@ ynh_add_systemd_config
|
|||
|
||||
# Use logrotate to manage application logfile(s)
|
||||
ynh_use_logrotate
|
||||
yunohost service add $app --description="Team collaboration communication platform"
|
||||
yunohost service add $app --description="Team collaboration communication platform" --log="/var/log/$app/$app.log"
|
||||
|
||||
#==============================================
|
||||
# INSTALL ROCKETCHAT
|
||||
|
|
|
@ -18,10 +18,11 @@ db_name=$(ynh_app_setting_get --app=$app --key=db_name)
|
|||
db_user=$db_name
|
||||
|
||||
#=================================================
|
||||
# STANDARD REMOVE
|
||||
# REMOVE SYSTEM CONFIGURATIONS
|
||||
#=================================================
|
||||
# REMOVE SERVICE INTEGRATION IN YUNOHOST
|
||||
# REMOVE SYSTEMD SERVICE
|
||||
#=================================================
|
||||
ynh_script_progression --message="Removing system configurations related to $app..." --weight=1
|
||||
|
||||
# Remove the service from the list of services known by YunoHost (added from `yunohost service add`)
|
||||
if ynh_exec_warn_less yunohost service status $app >/dev/null
|
||||
|
|
|
@ -64,9 +64,11 @@ if ynh_exec_warn_less ynh_mongo_exec --command="printjson(rs.status())" | grep -
|
|||
fi
|
||||
|
||||
#=================================================
|
||||
# RESTORE SYSTEMD
|
||||
# RESTORE SYSTEM CONFIGURATIONS
|
||||
#=================================================
|
||||
ynh_script_progression --message="Restoring the systemd configuration..." --weight=1
|
||||
# RESTORE THE PHP-FPM CONFIGURATION
|
||||
#=================================================
|
||||
ynh_script_progression --message="Restoring system configurations related to $app..." --weight=1
|
||||
|
||||
ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf"
|
||||
|
||||
|
@ -75,12 +77,14 @@ systemctl enable $app.service --quiet
|
|||
|
||||
ynh_restore_file --origin_path="/etc/logrotate.d/$app"
|
||||
|
||||
yunohost service add $app --description="Team collaboration communication platform"
|
||||
yunohost service add $app --description="Team collaboration communication platform" --log="/var/log/$app/$app.log"
|
||||
|
||||
#=================================================
|
||||
# START SYSTEMD SERVICE
|
||||
# GENERIC FINALIZATION
|
||||
#=================================================
|
||||
ynh_script_progression --message="Starting a systemd service..." --weight=19
|
||||
# RELOAD NGINX AND PHP-FPM OR THE APP SERVICE
|
||||
#=================================================
|
||||
ynh_script_progression --message="Reloading NGINX web server and $app's service..." --weight=1
|
||||
|
||||
ynh_systemd_action --service_name=$app --action="start" --log_path="systemd" --line_match="SERVER RUNNING"
|
||||
|
||||
|
|
|
@ -97,9 +97,9 @@ pushd $install_dir/programs/server
|
|||
popd
|
||||
|
||||
#=================================================
|
||||
# SETUP SYSTEMD
|
||||
# REAPPLY SYSTEM CONFIGURATIONS
|
||||
#=================================================
|
||||
ynh_script_progression --message="Upgrading systemd configuration..." --weight=2
|
||||
ynh_script_progression --message="Upgrading system configurations related to $app..." --weight=1
|
||||
|
||||
# Create a dedicated NGINX config
|
||||
ynh_add_nginx_config
|
||||
|
@ -110,7 +110,7 @@ ynh_add_systemd_config
|
|||
# Use logrotate to manage app-specific logfile(s)
|
||||
ynh_use_logrotate --non-append
|
||||
|
||||
yunohost service add $app --description="Team collaboration communication platform"
|
||||
yunohost service add $app --description="Team collaboration communication platform" --log="/var/log/$app/$app.log"
|
||||
|
||||
#=================================================
|
||||
# START SYSTEMD SERVICE
|
||||
|
|
Loading…
Reference in a new issue