mirror of
https://github.com/YunoHost-Apps/pufferpanel_ynh.git
synced 2024-09-03 20:16:03 +02:00
manage rights
This commit is contained in:
parent
d0aa103a5a
commit
5d81a8c175
3 changed files with 19 additions and 0 deletions
|
@ -42,6 +42,9 @@ ynh_script_progression --message="Validating installation parameters..."
|
||||||
# ynh_die --message="Admin username minimum length is 5"
|
# ynh_die --message="Admin username minimum length is 5"
|
||||||
#fi
|
#fi
|
||||||
|
|
||||||
|
final_path=/var/www/$app
|
||||||
|
test ! -e "$final_path" || ynh_die --message="This path already contains a folder"
|
||||||
|
|
||||||
# Register (book) web path
|
# Register (book) web path
|
||||||
ynh_webpath_register --app=$app --domain=$domain --path_url=$path_url
|
ynh_webpath_register --app=$app --domain=$domain --path_url=$path_url
|
||||||
|
|
||||||
|
@ -72,6 +75,12 @@ ynh_script_progression --message="Installing dependencies..."
|
||||||
ynh_install_app_dependencies $pkg_dependencies
|
ynh_install_app_dependencies $pkg_dependencies
|
||||||
ynh_install_extra_app_dependencies --repo="deb https://packagecloud.io/pufferpanel/pufferpanel/debian/ buster main" --package="pufferpanel" --key="https://packagecloud.io/pufferpanel/pufferpanel/gpgkey"
|
ynh_install_extra_app_dependencies --repo="deb https://packagecloud.io/pufferpanel/pufferpanel/debian/ buster main" --package="pufferpanel" --key="https://packagecloud.io/pufferpanel/pufferpanel/gpgkey"
|
||||||
|
|
||||||
|
ynh_app_setting_set --app=$app --key=final_path --value=$final_path
|
||||||
|
|
||||||
|
chmod 750 "$final_path"
|
||||||
|
chmod -R o-rwx "$final_path"
|
||||||
|
chown -R $app:www-data "$final_path"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# NGINX CONFIGURATION
|
# NGINX CONFIGURATION
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -29,6 +29,7 @@ app=$YNH_APP_INSTANCE_NAME
|
||||||
|
|
||||||
domain=$(ynh_app_setting_get --app=$app --key=domain)
|
domain=$(ynh_app_setting_get --app=$app --key=domain)
|
||||||
path_url=$(ynh_app_setting_get --app=$app --key=path)
|
path_url=$(ynh_app_setting_get --app=$app --key=path)
|
||||||
|
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# CHECK IF THE APP CAN BE RESTORED
|
# CHECK IF THE APP CAN BE RESTORED
|
||||||
|
@ -55,6 +56,10 @@ ynh_script_progression --message="Reinstalling dependencies..."
|
||||||
ynh_install_app_dependencies $pkg_dependencies
|
ynh_install_app_dependencies $pkg_dependencies
|
||||||
ynh_install_extra_app_dependencies --repo="deb https://packagecloud.io/pufferpanel/pufferpanel/debian/ buster main" --package="pufferpanel" --key="https://packagecloud.io/pufferpanel/pufferpanel/gpgkey"
|
ynh_install_extra_app_dependencies --repo="deb https://packagecloud.io/pufferpanel/pufferpanel/debian/ buster main" --package="pufferpanel" --key="https://packagecloud.io/pufferpanel/pufferpanel/gpgkey"
|
||||||
|
|
||||||
|
chmod 750 "$final_path"
|
||||||
|
chmod -R o-rwx "$final_path"
|
||||||
|
chown -R $app:www-data "$final_path"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# RESTORE VARIOUS FILES
|
# RESTORE VARIOUS FILES
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -19,6 +19,7 @@ app=$YNH_APP_INSTANCE_NAME
|
||||||
domain=$(ynh_app_setting_get --app=$app --key=domain)
|
domain=$(ynh_app_setting_get --app=$app --key=domain)
|
||||||
path_url=$(ynh_app_setting_get --app=$app --key=path)
|
path_url=$(ynh_app_setting_get --app=$app --key=path)
|
||||||
port=$(ynh_app_setting_get --app=$app --key=port)
|
port=$(ynh_app_setting_get --app=$app --key=port)
|
||||||
|
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# CHECK VERSION
|
# CHECK VERSION
|
||||||
|
@ -79,6 +80,10 @@ ynh_script_progression --message="Upgrading dependencies..."
|
||||||
ynh_install_app_dependencies $pkg_dependencies
|
ynh_install_app_dependencies $pkg_dependencies
|
||||||
ynh_install_extra_app_dependencies --repo="deb https://packagecloud.io/pufferpanel/pufferpanel/debian/ buster main" --package="pufferpanel" --key="https://packagecloud.io/pufferpanel/pufferpanel/gpgkey"
|
ynh_install_extra_app_dependencies --repo="deb https://packagecloud.io/pufferpanel/pufferpanel/debian/ buster main" --package="pufferpanel" --key="https://packagecloud.io/pufferpanel/pufferpanel/gpgkey"
|
||||||
|
|
||||||
|
chmod 750 "$final_path"
|
||||||
|
chmod -R o-rwx "$final_path"
|
||||||
|
chown -R $app:www-data "$final_path"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# SPECIFIC UPGRADE
|
# SPECIFIC UPGRADE
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
Loading…
Add table
Reference in a new issue