diff --git a/scripts/install b/scripts/install index 9c87473..874883c 100644 --- a/scripts/install +++ b/scripts/install @@ -136,10 +136,10 @@ ynh_add_config --template="../conf/cron" --destination="/etc/cron.d/$app" #================================================= ynh_script_progression --message="Adding a config file..." -ynh_add_config --template="../conf/ost-sampleconfig.php" --destination="$final_path/include/ost-config.php" +cp -f "../conf/ost-sampleconfig.php" "$final_path/include/ost-config.php" -chmod 400 "$final_path/include/ost-config.php" -chown $app:$app "$final_path/include/ost-config.php" +chmod 666 "$final_path/include/ost-config.php" +chown $app:www-data "$final_path/include/ost-config.php" #================================================= # BUILD PLUGINS @@ -170,6 +170,7 @@ pushd "$final_path/include/plugins/build" #php${phpversion} -dphar.readonly=0 make.php build preventautoscroll #cp *.phar $final_path/include/plugins/. popd + ynh_secure_remove --file="$final_path/include/plugins/build" #================================================= @@ -202,6 +203,9 @@ ynh_permission_update --permission="main" --remove="visitors" ynh_secure_remove --file="$final_path/setup" +chmod 400 "$final_path/include/ost-config.php" +chown $app:www-data "$final_path/include/ost-config.php" + #================================================= # GENERIC FINALIZATION #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 58f15c2..25d21fb 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -138,10 +138,8 @@ phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) #================================================= ynh_script_progression --message="Updating a config file..." -ynh_add_config --template="../conf/ost-sampleconfig.php" --destination="$final_path/include/ost-config.php" - chmod 400 "$final_path/include/ost-config.php" -chown $app:$app "$final_path/include/ost-config.php" +chown $app:www-data "$final_path/include/ost-config.php" #================================================= # BUILD PLUGINS