mirror of
https://github.com/YunoHost-Apps/paheko_ynh.git
synced 2024-09-03 19:56:22 +02:00
cleaning
This commit is contained in:
parent
0837b9cbdd
commit
129160be4c
3 changed files with 29 additions and 23 deletions
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* NE PAS MODIFIER CE FICHIER. Il est regénéré automatiquement à chaque mise à jour de Yunohost
|
||||
* NE PAS MODIFIER CE FICHIER. Il est regénéré automatiquement à chaque mise à jour de YunoHost
|
||||
*
|
||||
* Pour ajouter vos configurations personnalisées, rendez-vous dans le fichier data/config.local.user.php
|
||||
*/
|
||||
|
|
|
@ -9,12 +9,11 @@ location __PATH__/ {
|
|||
# Increase size limit
|
||||
client_max_body_size 2M;
|
||||
|
||||
try_files $uri $uri/ __PATH__/__PATH__/_route.php?$query_string;
|
||||
location ~ \.php$ {
|
||||
if (!-e $request_filename) {
|
||||
rewrite ^__PATH__/?(.*)$ __PATH__/_route.php?/$1 last;
|
||||
break;
|
||||
}
|
||||
#try_files $uri $uri/ __PATH__/__PATH__/_route.php?$query_string;
|
||||
try_files $uri $uri/ __PATH__/_route.php?$query_string;
|
||||
|
||||
location ~ [^/]\.php(/|$) {
|
||||
fastcgi_split_path_info ^(.+?\.php)(/.*)$;
|
||||
fastcgi_pass unix:/var/run/php/php__PHPVERSION__-fpm-__NAME__.sock;
|
||||
|
||||
fastcgi_index index.php;
|
||||
|
|
|
@ -9,6 +9,9 @@
|
|||
source _common.sh
|
||||
source /usr/share/yunohost/helpers
|
||||
|
||||
secret_key=$(ynh_string_random --length=50)
|
||||
ynh_app_setting_set --app=$app --key=secret_key --value=$secret_key
|
||||
|
||||
#=================================================
|
||||
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
||||
#=================================================
|
||||
|
@ -38,25 +41,29 @@ ynh_add_nginx_config
|
|||
#=================================================
|
||||
ynh_script_progression --message="Adding a configuration file..." --weight=5
|
||||
|
||||
# create a key for the secret key CSFR:
|
||||
secret_key=$(ynh_string_random --length=50)
|
||||
ynh_app_setting_set --app=$app --key=secret_key --value=$secret_key
|
||||
|
||||
# Install configuration files
|
||||
ynh_add_config --template="config.local.php" --destination="$install_dir/config.local.php"
|
||||
ynh_add_config --template="config.local.yunohost.php" --destination="$install_dir/config.local.yunohost.php"
|
||||
ynh_add_config --template="config.local.user.php" --destination="$install_dir/data/config.local.user.php"
|
||||
ynh_add_config --template="../conf/config.local.php" --destination="$install_dir/config.local.php"
|
||||
chmod 400 "$install_dir/config.local.php"
|
||||
chown $app:$app "$install_dir/config.local.php"
|
||||
|
||||
ynh_add_config --template="../conf/config.local.yunohost.php" --destination="$install_dir/config.local.yunohost.php"
|
||||
chmod 400 "$install_dir/config.local.yunohost.php"
|
||||
chown $app:$app "$install_dir/config.local.yunohost.php"
|
||||
|
||||
ynh_add_config --template="../conf/config.local.user.php" --destination="$install_dir/data/config.local.user.php"
|
||||
chmod 400 "$install_dir/data/config.local.user.php"
|
||||
chown $app:$app "$install_dir/data/config.local.user.php"
|
||||
|
||||
|
||||
# Permissions on files and directories
|
||||
chmod -R o-rwx "$install_dir"
|
||||
chown -R $app:www-data "$install_dir"
|
||||
find "$install_dir" -type d -exec chmod 550 {} +
|
||||
find "$install_dir" -type f -exec chmod 440 {} +
|
||||
find "$install_dir/data" -type d -exec chmod 770 {} +
|
||||
find "$install_dir/data" -type f -exec chmod 660 {} +
|
||||
chmod 440 "$install_dir/config.local.php"
|
||||
chmod 440 "$install_dir/config.local.yunohost.php"
|
||||
chmod 660 "$install_dir/data/config.local.user.php"
|
||||
|
||||
#find "$install_dir" -type d -exec chmod 550 {} +
|
||||
#find "$install_dir" -type f -exec chmod 440 {} +
|
||||
#find "$install_dir/data" -type d -exec chmod 770 {} +
|
||||
#find "$install_dir/data" -type f -exec chmod 660 {} +
|
||||
#chmod 440 "$install_dir/config.local.php"
|
||||
#chmod 440 "$install_dir/config.local.yunohost.php"
|
||||
#chmod 660 "$install_dir/data/config.local.user.php"
|
||||
|
||||
#=================================================
|
||||
# END OF SCRIPT
|
||||
|
|
Loading…
Add table
Reference in a new issue