mirror of
https://github.com/YunoHost-Apps/bozon_ynh.git
synced 2024-09-03 18:16:09 +02:00
commit
e2c6a58d9a
4 changed files with 27 additions and 4 deletions
|
@ -46,7 +46,7 @@
|
|||
"name": "is_public",
|
||||
"type": "boolean",
|
||||
"ask": {
|
||||
"en": "Should this application be public ? (if not, sharing file with unregistered users still work)",
|
||||
"en": "Should this application be public ? (if not, sharing file with unregistered users will still work)",
|
||||
"fr": "Est-ce que cette application doit être visible publiquement ? (dans le cas contraire, le partage de fichiers avec des utilisateurs externes fonctionnera tout de même)"
|
||||
},
|
||||
"default": false
|
||||
|
@ -55,7 +55,7 @@
|
|||
"name": "language",
|
||||
"ask": {
|
||||
"en": "Language (if the browser language is not detected)",
|
||||
"fr": "Langue (si la langue du naviguateur n'est détectée)"
|
||||
"fr": "Langue (si la langue du navigateur n'est pas détectée)"
|
||||
},
|
||||
"choices": ["de","en","es","fr"],
|
||||
"default": "en"
|
||||
|
@ -90,8 +90,8 @@
|
|||
"name": "backup_core_only",
|
||||
"type": "boolean",
|
||||
"ask": {
|
||||
"en": "In a case of backup should I only backup the core of the app ? (your uploaded to BoZoN datas as videos, pictures, documents, etc. will not be backuped)",
|
||||
"fr": "En cas de sauvegarde dois-je seulement sauvegarder le coeur de l'application ? (les fichiers trasnférés dans BoZoN tels que les vidéos, images, documents, etc. ne seront pas sauvegardés)"
|
||||
"en": "In a case of backup should I only backup the core of the app ? (your uploaded datas to BoZoN as videos, pictures, documents, etc. will not be backuped)",
|
||||
"fr": "En cas de sauvegarde dois-je seulement sauvegarder le coeur de l'application ? (les fichiers transférés dans BoZoN tels que les vidéos, images, documents, etc. ne seront pas sauvegardés)"
|
||||
},
|
||||
"default": true
|
||||
}
|
||||
|
|
|
@ -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
|
||||
#=================================================
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue