1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/metabase_ynh.git synced 2024-09-03 19:46:00 +02:00

Add rights

This commit is contained in:
ericgaspar 2021-08-02 19:03:22 +02:00
parent 73da8daae7
commit b0dc8f2c59
No known key found for this signature in database
GPG key ID: 574F281483054D44
2 changed files with 17 additions and 11 deletions

View file

@ -51,6 +51,14 @@ test ! -d "$final_path" \
ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf"
#=================================================
# RECREATE THE DEDICATED USER
#=================================================
ynh_script_progression --message="Recreating the dedicated system user..." --weight=3
# Create the dedicated user (if not existing)
ynh_system_user_create --username=$app --home_dir="$final_path"
#=================================================
# RESTORE THE APP MAIN DIR
#=================================================
@ -58,13 +66,10 @@ ynh_script_progression --message="Restoring Metabase main directory..." --weight
ynh_restore_file --origin_path="$final_path"
#=================================================
# RECREATE THE DEDICATED USER
#=================================================
ynh_script_progression --message="Recreating the dedicated system user..." --weight=3
# Create the dedicated user (if not existing)
ynh_system_user_create --username=$app
chmod 750 "$final_path"
chmod -R o-rwx "$final_path"
chown -R $app:www-data "$final_path"
chmod +x $final_path/metabase.jar
#=================================================
# INSTALL DEPENDENCIES

View file

@ -20,7 +20,6 @@ app=$YNH_APP_INSTANCE_NAME
domain=$(ynh_app_setting_get --app=$app --key=domain)
path_url=$(ynh_app_setting_get --app=$app --key=path)
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
is_public=$(ynh_app_setting_get --app=$app --key=is_public)
port=$(ynh_app_setting_get --app=$app --key=port)
db_pwd=$(ynh_app_setting_get --app=$app --key=psqlpwd)
db_name=$(ynh_app_setting_get --app=$app --key=db_name)
@ -90,6 +89,11 @@ 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"
chmod +x $final_path/metabase.jar
#=================================================
# NGINX CONFIGURATION
#=================================================
@ -118,9 +122,6 @@ ynh_add_systemd_config
# SECURE FILES AND DIRECTORIES
#=================================================
chmod +x $final_path/metabase.jar
chown -R $app: $final_path
chown $app: /var/log/$app.log
chmod 640 /etc/default/$app