mirror of
https://github.com/YunoHost-Apps/mattermost_ynh.git
synced 2024-09-03 19:36:29 +02:00
scripts: use ynh_add_nginx_config
helper
This commit is contained in:
parent
a0a9fe6ab7
commit
f781efb160
4 changed files with 9 additions and 6 deletions
|
@ -149,7 +149,8 @@ sudo chown -R www-data: $data_path
|
||||||
# NGINX CONFIGURATION
|
# NGINX CONFIGURATION
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
sudo cp $root_path/conf/nginx.conf-nosub /etc/nginx/conf.d/$domain.d/mattermost.conf
|
# Copy conf/nginx.conf to the correct location
|
||||||
|
ynh_add_nginx_config
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# SETUP SUPERVISOR
|
# SETUP SUPERVISOR
|
||||||
|
@ -177,4 +178,5 @@ sudo yunohost app ssowatconf
|
||||||
#=================================================
|
#=================================================
|
||||||
# START APP
|
# START APP
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
sudo supervisorctl reload
|
sudo supervisorctl reload
|
||||||
|
|
|
@ -39,14 +39,14 @@ ynh_mysql_remove_db "$db_user" "$db_name"
|
||||||
# REMOVE APP MAIN DIR
|
# REMOVE APP MAIN DIR
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
sudo rm -rf "$final_path"
|
ynh_secure_remove "$final_path"
|
||||||
sudo rm -rf "$data_path"
|
ynh_secure_remove "$data_path"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# REMOVE NGINX CONFIGURATION
|
# REMOVE NGINX CONFIGURATION
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
sudo rm -f "/etc/nginx/conf.d/${domain}.d/${app}.conf"
|
ynh_remove_nginx_config
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# REMOVE LOG FILE
|
# REMOVE LOG FILE
|
||||||
|
|
|
@ -7,6 +7,7 @@ source /usr/share/yunohost/helpers
|
||||||
ynh_abort_if_errors
|
ynh_abort_if_errors
|
||||||
|
|
||||||
# Retrieve arguments
|
# Retrieve arguments
|
||||||
|
app=$YNH_APP_INSTANCE_NAME
|
||||||
domain=$(ynh_app_setting_get mattermost domain)
|
domain=$(ynh_app_setting_get mattermost domain)
|
||||||
is_public=$(ynh_app_setting_get mattermost is_public)
|
is_public=$(ynh_app_setting_get mattermost is_public)
|
||||||
|
|
||||||
|
@ -58,8 +59,8 @@ sudo sed -i "s|\"FileLocation\": \"/var/log/mattermost.log\"|\"FileLocation\": \
|
||||||
# Restore file permissions
|
# Restore file permissions
|
||||||
sudo chown -R www-data: "$final_path"
|
sudo chown -R www-data: "$final_path"
|
||||||
|
|
||||||
# Update Nginx configuration file
|
# Update Nginx configuration
|
||||||
sudo cp -f $root_path/conf/nginx.conf-nosub /etc/nginx/conf.d/$domain.d/mattermost.conf
|
ynh_add_nginx_config
|
||||||
|
|
||||||
# Start server
|
# Start server
|
||||||
sudo supervisorctl start mattermost
|
sudo supervisorctl start mattermost
|
||||||
|
|
Loading…
Add table
Reference in a new issue