1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/castopod_ynh.git synced 2024-09-03 18:16:14 +02:00

Protect the configuration file

This commit is contained in:
ericgaspar 2021-03-23 15:52:58 +01:00
parent 3d975756db
commit 067a1d037a
No known key found for this signature in database
GPG key ID: 574F281483054D44
6 changed files with 33 additions and 27 deletions

View file

@ -10,7 +10,7 @@ location / {
index index.php;
client_max_body_size 500M;
client_max_body_size 512M;
try_files $uri $uri/ /index.php;

View file

@ -420,7 +420,7 @@ chdir = __FINALPATH__
; Common values to change to increase file upload limit
php_admin_value[upload_max_filesize] = 500M
php_admin_value[post_max_size] = 510M
php_admin_value[post_max_size] = 512M
; php_admin_flag[mail.add_x_header] = Off
; Other common parameters

View file

@ -6,7 +6,7 @@
"en": "Hosting platform made for podcasters",
"fr": "Plateforme d'hébergement conçue pour les podcasteurs"
},
"version": "1.0.0-40~ynh1",
"version": "1.0.0-40~ynh2",
"url": "https://podlibre.org/",
"license": "GPL-3.0-only",
"maintainer": {

View file

@ -55,6 +55,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..." --weight=1
# Create a system user
ynh_system_user_create --username=$app --home_dir=$final_path
#=================================================
# DOWNLOAD, CHECK AND UNPACK SOURCE
#=================================================
@ -72,14 +80,6 @@ ynh_script_progression --message="Configuring NGINX web server..." --weight=1
# Create a dedicated NGINX config
ynh_add_nginx_config
#=================================================
# CREATE DEDICATED USER
#=================================================
ynh_script_progression --message="Configuring system user..." --weight=1
# Create a system user
ynh_system_user_create --username=$app
#=================================================
# PHP-FPM CONFIGURATION
#=================================================
@ -111,6 +111,8 @@ ynh_store_file_checksum --file="$final_path/.env"
chown -R $app: $final_path
chmod -R 755 $final_path
chmod 600 $final_path/.env
#=================================================
# SETUP SSOWAT
#=================================================

View file

@ -52,20 +52,20 @@ test ! -d $final_path \
ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf"
#=================================================
# RESTORE THE APP MAIN DIR
#=================================================
ynh_script_progression --message="Restoring the app main directory..." --weight=2
ynh_restore_file --origin_path="$final_path"
#=================================================
# RECREATE THE DEDICATED USER
#=================================================
ynh_script_progression --message="Recreating the dedicated system user..." --weight=1
# Create the dedicated user (if not existing)
ynh_system_user_create --username=$app
ynh_system_user_create --username=$app --home_dir=$final_path
#=================================================
# RESTORE THE APP MAIN DIR
#=================================================
ynh_script_progression --message="Restoring the app main directory..." --weight=2
ynh_restore_file --origin_path="$final_path"
#=================================================
# RESTORE USER RIGHTS
@ -75,6 +75,8 @@ ynh_system_user_create --username=$app
chown -R $app: $final_path
chmod -R 755 $final_path
chmod 600 $final_path/.env
#=================================================
# RESTORE THE PHP-FPM CONFIGURATION
#=================================================

View file

@ -65,6 +65,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..." --weight=1
# Create a dedicated user (if not existing)
ynh_system_user_create --username=$app --home_dir=$final_path
#=================================================
# DOWNLOAD, CHECK AND UNPACK SOURCE
#=================================================
@ -85,14 +93,6 @@ ynh_script_progression --message="Upgrading NGINX web server configuration..." -
# Create a dedicated NGINX config
ynh_add_nginx_config
#=================================================
# CREATE DEDICATED USER
#=================================================
ynh_script_progression --message="Making sure dedicated system user exists..." --weight=1
# Create a dedicated user (if not existing)
ynh_system_user_create --username=$app
#=================================================
# PHP-FPM CONFIGURATION
#=================================================
@ -111,6 +111,8 @@ ynh_add_fpm_config --package="$extra_php_dependencies"
chown -R $app: $final_path
chmod -R 755 $final_path
chmod 600 $final_path/.env
#=================================================
# RELOAD NGINX
#=================================================