1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/dokuwiki_ynh.git synced 2024-09-03 18:26:20 +02:00

fix copied files being owned by root and not app user

This commit is contained in:
Gofannon 2022-08-18 23:59:19 +02:00
parent 0473c71a35
commit 4802b254bf
2 changed files with 11 additions and 11 deletions

View file

@ -141,20 +141,20 @@ ynh_add_config --template="../conf/acl.auth.php" --destination="$final_path/conf
# Other files will be read ony and owned by root. # Other files will be read ony and owned by root.
# See https://www.dokuwiki.org/install:permissions # See https://www.dokuwiki.org/install:permissions
cp $final_path/conf/local.php.dist $final_path/conf/local.php.bak cp --archive $final_path/conf/local.php.dist $final_path/conf/local.php.bak
cp $final_path/conf/users.auth.php.dist $final_path/conf/users.auth.php cp --archive $final_path/conf/users.auth.php.dist $final_path/conf/users.auth.php
# This file might be used by plugins like https://www.dokuwiki.org/plugin:siteexport # This file might be used by plugins like https://www.dokuwiki.org/plugin:siteexport
# Create it to be more "user friendly" as over the top security is not the main goal here # Create it to be more "user friendly" as over the top security is not the main goal here
# This file could be use for bad behaviour. # This file could be use for bad behaviour.
# See https://www.dokuwiki.org/devel:preload?s[]=preload # See https://www.dokuwiki.org/devel:preload?s[]=preload
cp $final_path/inc/preload.php.dist $final_path/inc/preload.php cp --archive $final_path/inc/preload.php.dist $final_path/inc/preload.php
# There is no template .dist provided inside DokuWiki installation folder # There is no template .dist provided inside DokuWiki installation folder
# Create "empty" files to be able to manage linux permissions # Create "empty" files to be able to manage linux permissions
# Files content is taken from an existing DokuWiki installation # Files content is taken from an existing DokuWiki installation
cp ../conf/plugins.local.php $final_path/conf cp --archive ../conf/plugins.local.php $final_path/conf
cp ../conf/plugins.local.php $final_path/conf/plugins.local.php.bak cp --archive ../conf/plugins.local.php $final_path/conf/plugins.local.php.bak
#================================================= #=================================================
# STORE THE CHECKSUM OF THE CONFIG FILE # STORE THE CHECKSUM OF THE CONFIG FILE

View file

@ -143,22 +143,22 @@ if [ ! -f "$final_path/conf/local.php.bak" ]; then
# if template exists # if template exists
if [ -f "$final_path/conf/local.php.dist" ]; then if [ -f "$final_path/conf/local.php.dist" ]; then
# Copy template to create default file # Copy template to create default file
cp "$final_path/conf/local.php.dist" "$final_path/conf/local.php.bak" cp --archive "$final_path/conf/local.php.dist" "$final_path/conf/local.php.bak"
fi fi
fi fi
if [ ! -f "$final_path/conf/users.auth.php" ]; then if [ ! -f "$final_path/conf/users.auth.php" ]; then
if [ -f "$final_path/conf/users.auth.php.dist" ]; then if [ -f "$final_path/conf/users.auth.php.dist" ]; then
cp $final_path/conf/users.auth.php.dist $final_path/conf/users.auth.php cp --archive $final_path/conf/users.auth.php.dist $final_path/conf/users.auth.php
fi fi
fi fi
if [ ! -f "$final_path/conf/plugins.local.php" ]; then if [ ! -f "$final_path/conf/plugins.local.php" ]; then
cp ../conf/plugins.local.php $final_path/conf cp --archive ../conf/plugins.local.php $final_path/conf
fi fi
if [ ! -f "$final_path/conf/plugins.local.php.bak" ]; then if [ ! -f "$final_path/conf/plugins.local.php.bak" ]; then
cp ../conf/plugins.local.php $final_path/conf/plugins.local.php.bak cp --archive ../conf/plugins.local.php $final_path/conf/plugins.local.php.bak
fi fi
@ -166,7 +166,7 @@ if [ ! -f "$final_path/inc/preload.php" ]; then
# if template exists # if template exists
if [ -f "$final_path/inc/preload.php.dist" ]; then if [ -f "$final_path/inc/preload.php.dist" ]; then
# Copy template to create default file # Copy template to create default file
cp "$final_path/inc/preload.php.dist" "$final_path/inc/preload.php" cp --archive "$final_path/inc/preload.php.dist" "$final_path/inc/preload.php"
fi fi
fi fi
@ -315,7 +315,7 @@ fi
ynh_backup_if_checksum_is_different --file="$final_path/conf/local.protected.php" ynh_backup_if_checksum_is_different --file="$final_path/conf/local.protected.php"
# Always overwrite local file with the one from package. # Always overwrite local file with the one from package.
cp ../conf/local.protected.php $final_path/conf cp --archive ../conf/local.protected.php $final_path/conf
# Customize admin group in case of multiple wiki install managed by different admins # Customize admin group in case of multiple wiki install managed by different admins
# dokuwiki.admin; dokuwiki__1.admin; etc # dokuwiki.admin; dokuwiki__1.admin; etc