mirror of
https://github.com/YunoHost-Apps/paheko_ynh.git
synced 2024-09-03 19:56:22 +02:00
permissions read only for conf files
This commit is contained in:
parent
c39fa209bd
commit
c968ab22d3
2 changed files with 4 additions and 4 deletions
|
@ -48,7 +48,7 @@ ynh_script_progression --message="Adding a configuration file..." --weight=5
|
||||||
# Install configuration files
|
# Install configuration files
|
||||||
ynh_add_config --template="config.local.php" --destination="$install_dir/config.local.php"
|
ynh_add_config --template="config.local.php" --destination="$install_dir/config.local.php"
|
||||||
|
|
||||||
chmod 650 "$install_dir/config.local.php"
|
chmod 440 "$install_dir/config.local.php"
|
||||||
chown $app:$app "$install_dir/config.local.php"
|
chown $app:$app "$install_dir/config.local.php"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -38,7 +38,7 @@ then
|
||||||
ynh_script_progression --message="cleaning conf files..." --weight=5
|
ynh_script_progression --message="cleaning conf files..." --weight=5
|
||||||
mv "$install_dir/config.local.php" "$install_dir/config.local.php.old"
|
mv "$install_dir/config.local.php" "$install_dir/config.local.php.old"
|
||||||
mv "$install_dir/config.local.yunohost.php" "$install_dir/config.local.php"
|
mv "$install_dir/config.local.yunohost.php" "$install_dir/config.local.php"
|
||||||
chmod 650 "$install_dir/config.local.php"
|
chmod 440 "$install_dir/config.local.php"
|
||||||
chown $app:$app "$install_dir/config.local.php"
|
chown $app:$app "$install_dir/config.local.php"
|
||||||
ynh_store_file_checksum --file="$install_dir/config.local.php"
|
ynh_store_file_checksum --file="$install_dir/config.local.php"
|
||||||
ynh_secure_remove "$install_dir/config.local.php.old"
|
ynh_secure_remove "$install_dir/config.local.php.old"
|
||||||
|
@ -98,7 +98,7 @@ ynh_script_progression --message="Updating a configuration file..." --weight=5
|
||||||
# Install configuration files
|
# Install configuration files
|
||||||
ynh_add_config --template="config.local.php" --destination="$install_dir/config.local.php"
|
ynh_add_config --template="config.local.php" --destination="$install_dir/config.local.php"
|
||||||
|
|
||||||
chmod 650 "$install_dir/config.local.php"
|
chmod 440 "$install_dir/config.local.php"
|
||||||
chown $app:$app "$install_dir/config.local.php"
|
chown $app:$app "$install_dir/config.local.php"
|
||||||
|
|
||||||
ynh_replace_string --match_string="//require '$data_dir/data/config.local.user.php';" --replace_string="require '$data_dir/data/config.local.user.php';" --target_file="$install_dir/config.local.php"
|
ynh_replace_string --match_string="//require '$data_dir/data/config.local.user.php';" --replace_string="require '$data_dir/data/config.local.user.php';" --target_file="$install_dir/config.local.php"
|
||||||
|
@ -120,7 +120,7 @@ fi
|
||||||
if [ ! -f "$data_dir/data/config.local.user.php" ]; then
|
if [ ! -f "$data_dir/data/config.local.user.php" ]; then
|
||||||
ynh_script_progression --message="Adding a configuration file..." --weight=5
|
ynh_script_progression --message="Adding a configuration file..." --weight=5
|
||||||
ynh_add_config --template="config.local.user.php" --destination="$data_dir/data/config.local.user.php"
|
ynh_add_config --template="config.local.user.php" --destination="$data_dir/data/config.local.user.php"
|
||||||
chmod 650 "$data_dir/data/config.local.user.php"
|
chmod 440 "$data_dir/data/config.local.user.php"
|
||||||
chown $app:$app "$data_dir/data/config.local.user.php"
|
chown $app:$app "$data_dir/data/config.local.user.php"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue