Aligner le paquet sur le modèle YunoHost
This commit is contained in:
parent
1a45355ed3
commit
7ae2307abf
16 changed files with 302 additions and 35 deletions
|
|
@ -1,31 +1,29 @@
|
|||
#!/bin/bash
|
||||
|
||||
#=================================================
|
||||
# COMMON VARIABLES AND CUSTOM HELPERS
|
||||
#=================================================
|
||||
|
||||
source /usr/share/yunohost/helpers
|
||||
|
||||
php_upload_max_filesize="250M"
|
||||
|
||||
install_yunohost_logo() {
|
||||
install -D -m 0644 "$YNH_APP_BASEDIR/logo.png" "/usr/share/yunohost/applogos/$app.png"
|
||||
if ! yunohost app config set "$app" _core.permission_main.permission_main_logo \
|
||||
--value="$YNH_APP_BASEDIR/logo.png" \
|
||||
--core; then
|
||||
ynh_print_warn --message="Le logo du portail YunoHost n'a pas pu être enregistré. L'installation de Globinours continue."
|
||||
fi
|
||||
}
|
||||
|
||||
prepare_persistent_paths() {
|
||||
mkdir -p "$data_dir/association" "$data_dir/grants" "$data_dir/medical-documents" \
|
||||
"$data_dir/private-media" "$data_dir/media" "$data_dir/storage/logs" \
|
||||
"$data_dir/storage/backups" "$data_dir/storage/releases"
|
||||
ynh_safe_rm "$install_dir/data"
|
||||
ynh_safe_rm "$install_dir/storage"
|
||||
ynh_safe_rm "$install_dir/public/media"
|
||||
for path_to_replace in "$install_dir/data" "$install_dir/storage" "$install_dir/public/media"; do
|
||||
if [[ -e "$path_to_replace" || -L "$path_to_replace" ]]; then
|
||||
ynh_safe_rm "$path_to_replace"
|
||||
fi
|
||||
done
|
||||
|
||||
ln -s "$data_dir" "$install_dir/data"
|
||||
ln -s "$data_dir/storage" "$install_dir/storage"
|
||||
ln -s "$data_dir/media" "$install_dir/public/media"
|
||||
|
||||
chown -R "$app:www-data" "$install_dir"
|
||||
chown -R "$app:$app" "$data_dir"
|
||||
chmod -R u=rwX,g=rX,o= "$install_dir"
|
||||
chmod -R u=rwX,g=,o= "$data_dir"
|
||||
|
||||
chown "$app:www-data" "$data_dir"
|
||||
chmod 0710 "$data_dir"
|
||||
chown -R "$app:www-data" "$data_dir/media"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue