1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/bozon_ynh.git synced 2024-09-03 18:16:09 +02:00
This commit is contained in:
ewilly 2017-07-25 19:12:31 +02:00
parent 1a2c6d7d68
commit b2ed27f418
3 changed files with 23 additions and 0 deletions

View file

@ -89,6 +89,21 @@ myynh_remove_fpm_config () {
sudo systemctl restart php5-fpm
}
# Update the according fo filesize
myynh_update_bozon_auto_dropzone () {
case ${filesize: -1} in
g|G)
max_length=$((${filesize%?}*1024))
;;
*)
max_length=${filesize%?}
;;
esac
if [ -e "$bozon_auto_dropzone_php" ];then
ynh_replace_string "'max_length'=>2048" "'max_length'=>$max_length" "$bozon_auto_dropzone_php"
fi
}
#=================================================
# FUTURE YUNOHOST HELPERS - TO BE REMOVED LATER
#=================================================

View file

@ -21,6 +21,7 @@ backup_core_only=$YNH_APP_ARG_BACKUP_CORE_ONLY
final_path="/var/www/$app"
data_path="/home/yunohost.app/$app"
bozon_conf="$final_path/config.php"
bozon_auto_dropzone_php="$final_path/core/auto_dropzone.php"
nginx_conf="/etc/nginx/conf.d/$domain.d/$app.conf"
phpfpm_conf="/etc/php5/fpm/pool.d/$app.conf"
@ -66,6 +67,9 @@ sudo mv "$TMPDIR" "$final_path"
ynh_replace_string "default_language='en'" "default_language='$language'" "$bozon_conf"
ynh_store_file_checksum "$bozon_conf"
# update auto_dropzone.php
myynh_update_bozon_auto_dropzone
# create private & data folders
myynh_create_dir "$final_path/private"
myynh_create_dir "$data_path/uploads"

View file

@ -20,6 +20,7 @@ backup_core_only=$(ynh_app_setting_get "$app" backup_core_only)
final_path="/var/www/$app"
data_path="/home/yunohost.app/$app"
bozon_conf="$final_path/config.php"
bozon_auto_dropzone_php="$final_path/core/auto_dropzone.php"
nginx_conf="/etc/nginx/conf.d/$domain.d/$app.conf"
phpfpm_conf="/etc/php5/fpm/pool.d/$app.conf"
@ -73,6 +74,9 @@ fi
sudo cp -a "$TMPDIR/." "$final_path"
sudo rm -R "$TMPDIR"
# update auto_dropzone.php
myynh_update_bozon_auto_dropzone
# set permissions
myynh_set_permissions