mirror of
https://github.com/YunoHost-Apps/icecoder_ynh.git
synced 2024-09-03 19:26:10 +02:00
Merge pull request #22 from YunoHost-Apps/testing
Fix installation bug about permissions
This commit is contained in:
commit
e01144be05
2 changed files with 14 additions and 12 deletions
|
@ -55,15 +55,7 @@ final_path=$path_url
|
||||||
test ! -e "$final_path" || ynh_die --message="This path already contains a folder"
|
test ! -e "$final_path" || ynh_die --message="This path already contains a folder"
|
||||||
|
|
||||||
# Register (book) web path
|
# Register (book) web path
|
||||||
if [[ $path_url =~ my_webapp ]]
|
ynh_webpath_register --app=$app --domain=$domain --path_url=$path_url
|
||||||
then
|
|
||||||
mkdir $YNH_APP_ARG_PATH
|
|
||||||
ynh_webpath_register --app=$app --domain=$domain --path_url=$YNH_APP_ARG_PATH
|
|
||||||
chown -R my_webapp $final_path
|
|
||||||
else
|
|
||||||
ynh_webpath_register --app=$app --domain=$domain --path_url=$path_url
|
|
||||||
chown -R www-data.www-data $final_path
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -114,10 +106,16 @@ ynh_script_progression --message="Configuring log rotation..." --weight=1
|
||||||
ynh_use_logrotate
|
ynh_use_logrotate
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# SETUP SSOWAT
|
# SETUP PERMISSIONS
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Configuring permissions..." --weight=1
|
ynh_script_progression --message="Configuring permissions..." --weight=1
|
||||||
|
|
||||||
|
if [[ $path_url =~ my_webapp ]]
|
||||||
|
then
|
||||||
|
chown -R my_webapp $final_path
|
||||||
|
else
|
||||||
|
chown -R www-data.www-data $final_path
|
||||||
|
fi
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# END OF SCRIPT
|
# END OF SCRIPT
|
||||||
|
|
|
@ -58,8 +58,12 @@ ynh_restore_file --origin_path="$final_path"
|
||||||
# RESTORE USER RIGHTS
|
# RESTORE USER RIGHTS
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
# Configure internal permissions for ICEcoder
|
if [[ $path_url =~ my_webapp ]]
|
||||||
chown -R my_webapp $final_path
|
then
|
||||||
|
chown -R my_webapp $final_path
|
||||||
|
else
|
||||||
|
chown -R www-data.www-data $final_path
|
||||||
|
fi
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# RESTORE THE LOGROTATE CONFIGURATION
|
# RESTORE THE LOGROTATE CONFIGURATION
|
||||||
|
|
Loading…
Reference in a new issue