mirror of
https://github.com/YunoHost-Apps/dokuwiki_ynh.git
synced 2024-09-03 18:26:20 +02:00
[enh] cleaning by removing "sudo" in scripts
This commit is contained in:
parent
adc5f446a1
commit
0651318860
3 changed files with 21 additions and 21 deletions
|
@ -107,13 +107,13 @@ ynh_replace_string "__YNH_LANGUAGE__" "$language" "../conf/local.php"
|
||||||
ynh_replace_string "__YNH_ADMIN_USER__" "$admin" "../conf/local.php"
|
ynh_replace_string "__YNH_ADMIN_USER__" "$admin" "../conf/local.php"
|
||||||
|
|
||||||
# Copy Yunohost specific configuration
|
# Copy Yunohost specific configuration
|
||||||
sudo cp ../conf/local.php $final_path/conf
|
cp ../conf/local.php $final_path/conf
|
||||||
|
|
||||||
|
|
||||||
# Restrict user rights by enforcing "read-only" mode for all users
|
# Restrict user rights by enforcing "read-only" mode for all users
|
||||||
# See https://www.dokuwiki.org/acl#background_info
|
# See https://www.dokuwiki.org/acl#background_info
|
||||||
# Default is "8"
|
# Default is "8"
|
||||||
sudo cp ../conf/acl.auth.php $final_path/conf
|
cp ../conf/acl.auth.php $final_path/conf
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# STORE THE CHECKSUM OF THE CONFIG FILE
|
# STORE THE CHECKSUM OF THE CONFIG FILE
|
||||||
|
@ -140,11 +140,11 @@ ynh_add_systemd_config
|
||||||
chown -R root: $final_path
|
chown -R root: $final_path
|
||||||
|
|
||||||
# except for conf, data, some data subfolders, and lib/plugin, where www-data must have write permissions
|
# except for conf, data, some data subfolders, and lib/plugin, where www-data must have write permissions
|
||||||
sudo chown -R $app:root $final_path/{conf,data,data/attic,data/cache,data/index,data/locks,data/media*,data/meta,data/pages,data/tmp,lib/plugins,lib/tpl}
|
chown -R $app:root $final_path/{conf,data,data/attic,data/cache,data/index,data/locks,data/media*,data/meta,data/pages,data/tmp,lib/plugins,lib/tpl}
|
||||||
sudo chmod -R 700 $final_path/conf
|
chmod -R 700 $final_path/conf
|
||||||
sudo chmod -R 700 $final_path/data
|
chmod -R 700 $final_path/data
|
||||||
sudo chmod -R 755 $final_path/lib/plugins
|
chmod -R 755 $final_path/lib/plugins
|
||||||
sudo chmod 755 $final_path/lib/tpl/{dokuwiki,dokuwiki/images}
|
chmod 755 $final_path/lib/tpl/{dokuwiki,dokuwiki/images}
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# SETUP LOGROTATE
|
# SETUP LOGROTATE
|
||||||
|
|
|
@ -70,11 +70,11 @@ chown -R root: $final_path
|
||||||
|
|
||||||
# Restore permissions same as from the 'install' script
|
# Restore permissions same as from the 'install' script
|
||||||
# except for conf, data, some data subfolders, and lib/plugin, where www-data must have write permissions
|
# except for conf, data, some data subfolders, and lib/plugin, where www-data must have write permissions
|
||||||
sudo chown -R $app:root $final_path/{conf,data,data/attic,data/cache,data/index,data/locks,data/media*,data/meta,data/pages,data/tmp,lib/plugins,lib/tpl}
|
chown -R $app:root $final_path/{conf,data,data/attic,data/cache,data/index,data/locks,data/media*,data/meta,data/pages,data/tmp,lib/plugins,lib/tpl}
|
||||||
sudo chmod -R 700 $final_path/conf
|
chmod -R 700 $final_path/conf
|
||||||
sudo chmod -R 700 $final_path/data
|
chmod -R 700 $final_path/data
|
||||||
sudo chmod -R 755 $final_path/lib/plugins
|
chmod -R 755 $final_path/lib/plugins
|
||||||
sudo chmod 755 $final_path/lib/tpl/{dokuwiki,dokuwiki/images}
|
chmod 755 $final_path/lib/tpl/{dokuwiki,dokuwiki/images}
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# RESTORE THE PHP-FPM CONFIGURATION
|
# RESTORE THE PHP-FPM CONFIGURATION
|
||||||
|
|
|
@ -110,7 +110,7 @@ ynh_add_fpm_config
|
||||||
|
|
||||||
# TODO Taken from old "upgrade" script. Should check if it is needed and what it does
|
# TODO Taken from old "upgrade" script. Should check if it is needed and what it does
|
||||||
if [ -d "${final_path}/data/media" ]; then
|
if [ -d "${final_path}/data/media" ]; then
|
||||||
sudo chown -R $app:root $final_path/{data/attic,data/cache,data/index,data/locks,data/media*,data/meta,data/pages,data/tmp}
|
chown -R $app:root $final_path/{data/attic,data/cache,data/index,data/locks,data/media*,data/meta,data/pages,data/tmp}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Set the "language" of Dokuwiki
|
# Set the "language" of Dokuwiki
|
||||||
|
@ -122,16 +122,16 @@ ynh_replace_string "__YNH_LANGUAGE__" "$language" "../conf/local.php"
|
||||||
ynh_replace_string "__YNH_ADMIN_USER__" "$admin" "../conf/local.php"
|
ynh_replace_string "__YNH_ADMIN_USER__" "$admin" "../conf/local.php"
|
||||||
|
|
||||||
# Copy Yunohost specific configuration
|
# Copy Yunohost specific configuration
|
||||||
sudo cp ../conf/local.php $final_path/conf
|
cp ../conf/local.php $final_path/conf
|
||||||
|
|
||||||
# Do not override ACL configuration file
|
# Do not override ACL configuration file
|
||||||
if [ ! -f "$final_path/conf/acl.auth.php" ]; then
|
if [ ! -f "$final_path/conf/acl.auth.php" ]; then
|
||||||
sudo cp ../conf/acl.auth.php $final_path/conf
|
cp ../conf/acl.auth.php $final_path/conf
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Remove upgrade notification
|
# Remove upgrade notification
|
||||||
# See https://www.dokuwiki.org/update_check
|
# See https://www.dokuwiki.org/update_check
|
||||||
sudo touch $final_path/doku.php
|
touch $final_path/doku.php
|
||||||
|
|
||||||
# Remove deleted files
|
# Remove deleted files
|
||||||
# See https://www.dokuwiki.org/install:unused_files
|
# See https://www.dokuwiki.org/install:unused_files
|
||||||
|
@ -185,11 +185,11 @@ chown -R root: $final_path
|
||||||
# Install script :
|
# Install script :
|
||||||
#sudo chown -R $app:root $final_path/{conf,data,data/attic,data/cache,data/index,data/locks,data/media*,data/meta,data/pages,data/tmp,lib/plugins,lib/tpl}
|
#sudo chown -R $app:root $final_path/{conf,data,data/attic,data/cache,data/index,data/locks,data/media*,data/meta,data/pages,data/tmp,lib/plugins,lib/tpl}
|
||||||
|
|
||||||
sudo chown -R $app:root $final_path/{conf,data,lib/plugins,lib/tpl}
|
chown -R $app:root $final_path/{conf,data,lib/plugins,lib/tpl}
|
||||||
sudo chmod -R 700 $final_path/conf
|
chmod -R 700 $final_path/conf
|
||||||
sudo chmod -R 700 $final_path/data
|
chmod -R 700 $final_path/data
|
||||||
sudo chmod -R 755 $final_path/lib/plugins
|
chmod -R 755 $final_path/lib/plugins
|
||||||
sudo chmod 755 $final_path/lib/tpl/{dokuwiki,dokuwiki/images}
|
chmod 755 $final_path/lib/tpl/{dokuwiki,dokuwiki/images}
|
||||||
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
Loading…
Add table
Reference in a new issue