1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/pelican_ynh.git synced 2024-09-03 19:46:35 +02:00

manage permissions

This commit is contained in:
yalh76 2022-03-28 17:55:56 +02:00
parent 4386674259
commit 665d5f5fe7
3 changed files with 18 additions and 8 deletions

View file

@ -84,6 +84,10 @@ ynh_replace_string --match_string="__AUTHOR__" --replace_string="$author" --targ
ynh_replace_string --match_string="__DATE__" --replace_string="$date" --target_file="../sources/content/first-article.md" ynh_replace_string --match_string="__DATE__" --replace_string="$date" --target_file="../sources/content/first-article.md"
cp -a ../sources/. $final_path cp -a ../sources/. $final_path
chmod 750 "$final_path"
chmod -R o-rwx "$final_path"
chown -R $app:www-data "$final_path"
#================================================= #=================================================
# NGINX CONFIGURATION # NGINX CONFIGURATION
#================================================= #=================================================
@ -107,10 +111,12 @@ pushd $final_path
pelican -s pelicanconf.py -D pelican -s pelicanconf.py -D
popd popd
# Set permissions chmod 750 "$final_path"
chmod 775 -R $final_path chmod -R o-rwx "$final_path"
chown -hR www-data:www-data $final_path chown -R $app:www-data "$final_path"
#=================================================
# GENERIC FINALIZATION
#================================================= #=================================================
# SETUP SSOWAT # SETUP SSOWAT
#================================================= #=================================================

View file

@ -52,8 +52,10 @@ ynh_script_progression --message="Restoring the app main directory..."
ynh_restore_file --origin_path="$final_path" ynh_restore_file --origin_path="$final_path"
chmod 775 -R $final_path chmod 750 "$final_path"
chown -hR www-data:www-data $final_path chmod -R o-rwx "$final_path"
chown -R $app:www-data "$final_path"
#================================================= #=================================================
# SPECIFIC RESTORATION # SPECIFIC RESTORATION
#================================================= #=================================================

View file

@ -76,6 +76,8 @@ then
# Download, check integrity, uncompress and patch the source from app.src # Download, check integrity, uncompress and patch the source from app.src
date=`date +%Y-%m-%d` date=`date +%Y-%m-%d`
mkdir -p $final_path mkdir -p $final_path
ynh_replace_string --match_string="__DOMAIN__" --replace_string="$domain" --target_file="../sources/publishconf.py"
ynh_replace_string --match_string="__PATH__" --replace_string="$path_url" --target_file="../sources/publishconf.py"
ynh_replace_string --match_string="__DOMAIN__" --replace_string="$domain" --target_file="../sources/pelicanconf.py" ynh_replace_string --match_string="__DOMAIN__" --replace_string="$domain" --target_file="../sources/pelicanconf.py"
ynh_replace_string --match_string="__PATH__" --replace_string="$path_url" --target_file="../sources/pelicanconf.py" ynh_replace_string --match_string="__PATH__" --replace_string="$path_url" --target_file="../sources/pelicanconf.py"
ynh_replace_string --match_string="__AUTHOR__" --replace_string="$author" --target_file="../sources/pelicanconf.py" ynh_replace_string --match_string="__AUTHOR__" --replace_string="$author" --target_file="../sources/pelicanconf.py"
@ -120,9 +122,9 @@ pushd $final_path
pelican -s pelicanconf.py -D pelican -s pelicanconf.py -D
popd popd
# Set permissions chmod 750 "$final_path"
chmod 775 -R $final_path chmod -R o-rwx "$final_path"
chown -hR www-data:www-data $final_path chown -R $app:www-data "$final_path"
#================================================= #=================================================
# GENERIC FINALIZATION # GENERIC FINALIZATION