1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/wallabag2_ynh.git synced 2024-10-01 13:35:06 +02:00

Install dependencies when restoring

This commit is contained in:
Jimmy Monin 2017-04-27 10:26:35 +02:00
parent 6f9e1ac1a0
commit c9af2d0dc7
2 changed files with 14 additions and 5 deletions

View file

@ -70,6 +70,13 @@ extract_wallabag() {
|| ynh_die "Unable to apply patches to Wallabag"
}
WARNING () { # Print on error output
$@ >&2
}
QUIET () { # redirect standard output to /dev/null
$@ > /dev/null
}
HUMAN_SIZE () { # Transforms a Kb-based size to a human-readable size
human=$(numfmt --to=iec --from-unit=1K $1)

View file

@ -34,17 +34,19 @@ db_name=$(ynh_app_setting_get $app db_name)
CHECK_DOMAINPATH # Check domain and path availability
CHECK_FINALPATH # Check if destination directory is not already in use
#=================================================
# INSTALL DEPENDENCIES
#=================================================
ynh_install_app_dependencies "$PKG_DEPENDENCIES"
#=================================================
# STANDARD RESTORE STEPS
#=================================================
# RESTORE NGINX CONFIGURATION
#=================================================
conf=/etc/nginx/conf.d/$domain.d/$app.conf
if [ -f $conf ]; then
ynh_die "There is already a nginx conf file at this path: $conf "
fi
sudo cp -a ./nginx.conf $conf
sudo cp -a ./nginx.conf /etc/nginx/conf.d/$domain.d/$app.conf
#=================================================
# RESTORE APP MAIN DIR