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-07-02 17:00:39 +02:00
parent e042f453d9
commit 8166c8c2e6
No known key found for this signature in database
GPG key ID: 574F281483054D44
4 changed files with 20 additions and 32 deletions

View file

@ -19,7 +19,7 @@
"email": "beudbeud@beudibox.fr"
},
"requirements": {
"yunohost": ">= 4.1.7"
"yunohost": ">= 4.2.4"
},
"multi_instance": false,
"services": [

View file

@ -88,6 +88,10 @@ ynh_app_setting_set --app=$app --key=final_path --value=$final_path
# Download, check integrity, uncompress and patch the source from app.src
ynh_setup_source --dest_dir=$final_path
chmod 750 "$final_path"
chmod -R o-rwx "$final_path"
chown -R $app:www-data "$final_path"
#=================================================
# NGINX CONFIGURATION
#=================================================
@ -103,10 +107,17 @@ ynh_add_nginx_config
#=================================================
ynh_script_progression --message="Modifying a config file..."
mkdir -p /home/yunohost.app/$app
$config_path=/home/yunohost.app/$app
ynh_app_setting_set --app=$app --key=$config_path --value=$config_path
mkdir -p $config_path
ynh_add_config --template="../conf/config.js" --destination="$config_path/config.js"
chmod 750 "$config_path"
chmod -R o-rwx "$config_path"
chown -R $app:www-data "$config_path"
#=================================================
# INSTALL THE LOUNGE
#=================================================
@ -128,17 +139,6 @@ ynh_replace_string --match_string="__NODE__" --replace_string="$nodejs_path" --t
ynh_add_systemd_config
#=================================================
# GENERIC FINALIZATION
#=================================================
# SECURE FILES AND DIRECTORIES
#=================================================
ynh_script_progression --message="Securing files and directories..."
# Set permissions to app files
chown -R $app: $final_path
chown -R $app: $config_path
#=================================================
# INTEGRATE SERVICE IN YUNOHOST
#=================================================

View file

@ -72,14 +72,9 @@ ynh_script_progression --message="Restoring the config path..."
ynh_restore_file --origin_path="$config_path"
#=================================================
# RESTORE USER RIGHTS
#=================================================
ynh_script_progression --message="Restoring user rights..."
# Restore permissions to app files
chown -R $app: $final_path
chown -R $app: $config_path
chmod 750 "$final_path"
chmod -R o-rwx "$final_path"
chown -R $app:www-data "$final_path"
#=================================================
# SPECIFIC RESTORATION

View file

@ -100,6 +100,10 @@ then
ynh_setup_source --dest_dir="$final_path"
fi
chmod 750 "$final_path"
chmod -R o-rwx "$final_path"
chown -R $app:www-data "$final_path"
#=================================================
# NGINX CONFIGURATION
#=================================================
@ -152,17 +156,6 @@ ynh_replace_string --match_string="__NODE__" --replace_string="$nodejs_path" --t
ynh_add_systemd_config
#=================================================
# GENERIC FINALIZATION
#=================================================
# SECURE FILES AND DIRECTORIES
#=================================================
ynh_script_progression --message="Securing files and directories..."
# Set permissions on app files
chown -R $app: $final_path
chown -R $app: $config_path
#=================================================
# GENERIC FINALIZATION
#=================================================