1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/ampache_ynh.git synced 2024-09-03 18:15:55 +02:00

Secure config file

This commit is contained in:
ericgaspar 2021-03-22 19:56:31 +01:00
parent d234fa2baa
commit ad106df969
No known key found for this signature in database
GPG key ID: 574F281483054D44
3 changed files with 19 additions and 16 deletions

View file

@ -66,6 +66,14 @@ db_user=$db_name
ynh_app_setting_set --app=$app --key=db_name --value=$db_name
ynh_mysql_setup_db --db_user=$db_user --db_name=$db_name
#=================================================
# CREATE DEDICATED USER
#=================================================
ynh_script_progression --message="Configuring system user..."
# Create a system user
ynh_system_user_create --username=$app
#=================================================
# DOWNLOAD, CHECK AND UNPACK SOURCE
#=================================================
@ -83,14 +91,6 @@ ynh_script_progression --message="Configuring NGINX web server..."
# Create a dedicated nginx config
ynh_add_nginx_config
#=================================================
# CREATE DEDICATED USER
#=================================================
ynh_script_progression --message="Configuring system user..."
# Create a system user
ynh_system_user_create --username=$app
#=================================================
# PHP-FPM CONFIGURATION
#=================================================
@ -169,6 +169,7 @@ ynh_script_progression --message="Securing files and directories..."
# Set permissions to ampache directory
chown -R $app: $final_path
chmod 600 $final_path/config/ampache.cfg.php
#=================================================
# SETUP SSOWAT

View file

@ -70,6 +70,7 @@ ynh_script_progression --message="Restoring user rights..."
# Restore permissions on app files
chown -R $app: $final_path
chmod 600 $final_path/config/ampache.cfg.php
#=================================================
# RESTORE THE PHP-FPM CONFIGURATION

View file

@ -78,6 +78,14 @@ ynh_clean_setup () {
# Exit if an error occurs during the execution of the script
ynh_abort_if_errors
#=================================================
# CREATE DEDICATED USER
#=================================================
ynh_script_progression --message="Making sure dedicated system user exists..."
# Create a dedicated user (if not existing)
ynh_system_user_create --username=$app
#=================================================
# DOWNLOAD, CHECK AND UNPACK SOURCE
#=================================================
@ -105,14 +113,6 @@ ynh_script_progression --message="Upgrading dependencies..." --weight=5
ynh_install_app_dependencies $pkg_dependencies
#=================================================
# CREATE DEDICATED USER
#=================================================
ynh_script_progression --message="Making sure dedicated system user exists..."
# Create a dedicated user (if not existing)
ynh_system_user_create --username=$app
#=================================================
# PHP-FPM CONFIGURATION
#=================================================
@ -180,6 +180,7 @@ ynh_script_progression --message="Securing files and directories..."
# Set permissions on app files
chown -R $app: $final_path
chmod 600 $final_path/config/ampache.cfg.php
#=================================================
# SETUP SSOWAT