mirror of
https://github.com/YunoHost-Apps/minchat_ynh.git
synced 2024-09-03 19:36:29 +02:00
[fix] clean code & fix is_public to restore
This commit is contained in:
parent
d4c46fa38d
commit
85283b25fc
2 changed files with 13 additions and 5 deletions
|
@ -22,18 +22,21 @@ CHECK_DOMAINPATH
|
||||||
|
|
||||||
CHECK_FINALPATH
|
CHECK_FINALPATH
|
||||||
|
|
||||||
|
# Save app settings
|
||||||
|
ynh_app_setting_set $app domain $domain
|
||||||
|
ynh_app_setting_set $app path $path
|
||||||
|
ynh_app_setting_set $app is_public $is_public
|
||||||
|
|
||||||
# Create system user dedicace for this app
|
# Create system user dedicace for this app
|
||||||
ynh_system_user_create $app
|
ynh_system_user_create $app
|
||||||
|
|
||||||
# Copy files to the right place
|
# Copy files to the right place
|
||||||
final_path=/var/www/$app
|
final_path=/var/www/$app
|
||||||
sudo mkdir -p $final_path
|
sudo mkdir -p $final_path
|
||||||
extract_source $final_path
|
ynh_app_setting_set $app final_path $final_path
|
||||||
|
|
||||||
# Copy files to the right place with the right permissions
|
# Get source application
|
||||||
final_path=/var/www/$app
|
extract_source $final_path
|
||||||
sudo mkdir -p $final_path
|
|
||||||
sudo chown -R $app: $final_path
|
|
||||||
|
|
||||||
# Modify Nginx configuration file and copy it to Nginx conf directory
|
# Modify Nginx configuration file and copy it to Nginx conf directory
|
||||||
ynh_nginx_config
|
ynh_nginx_config
|
||||||
|
|
|
@ -71,6 +71,11 @@ if [[ $is_public -eq 0 ]]; then
|
||||||
ynh_app_setting_delete $app skipped_uris
|
ynh_app_setting_delete $app skipped_uris
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ $is_public -eq 1 ]
|
||||||
|
then
|
||||||
|
ynh_app_setting_set $app skipped_uris "/" # Make app public if necessary
|
||||||
|
fi
|
||||||
|
|
||||||
# Reload service
|
# Reload service
|
||||||
sudo systemctl reload nginx
|
sudo systemctl reload nginx
|
||||||
sudo yunohost app ssowatconf
|
sudo yunohost app ssowatconf
|
Loading…
Reference in a new issue