mirror of
https://github.com/YunoHost-Apps/calibreweb_ynh.git
synced 2024-09-03 18:16:20 +02:00
Add info messages
This commit is contained in:
parent
db7c161216
commit
fdf22ac584
2 changed files with 10 additions and 5 deletions
|
@ -68,6 +68,7 @@ ynh_app_setting_set $app calibre_dir $calibre_dir
|
|||
# Find a free port
|
||||
port=$(ynh_find_port 8083)
|
||||
# Open this port
|
||||
ynh_print_info "Opening port $port"
|
||||
yunohost firewall allow --no-upnp TCP $port 2>&1
|
||||
ynh_app_setting_set $app port $port
|
||||
|
||||
|
@ -76,7 +77,7 @@ ynh_app_setting_set $app port $port
|
|||
#=================================================
|
||||
|
||||
ynh_app_setting_set $app final_path $final_path
|
||||
|
||||
ynh_print_info "Copying data to $final_path"
|
||||
# Download, check integrity, uncompress and patch the source from app.src
|
||||
#as long as v1 is not reached, sha256sum will change without notice so not usable, so we use cp -a instead.
|
||||
#source are directly in the app so far
|
||||
|
@ -88,6 +89,7 @@ cp -a ../src/. $final_path
|
|||
# INSTALL DEPENDENCIES
|
||||
#=================================================
|
||||
|
||||
ynh_print_info "Installing dependencies and pip packages"
|
||||
ynh_install_app_dependencies $pkg_dependencies
|
||||
pip install --target $final_path/vendor -r $final_path/requirements.txt
|
||||
|
||||
|
@ -144,6 +146,7 @@ chown -R $app:$app /var/log/$app
|
|||
#=================================================
|
||||
# SET SQLITE DATABASE SETTINGS
|
||||
#=================================================
|
||||
ynh_print_info "Setting up database and settings"
|
||||
#we need to start and stop the service so that initial app.db file is created and that we can set default data
|
||||
systemctl start $app
|
||||
#sleep required on low spec like raspberryPi
|
||||
|
@ -184,7 +187,7 @@ fi
|
|||
#=================================================
|
||||
# RELOAD NGINX
|
||||
#=================================================
|
||||
|
||||
ynh_print_info "Reload nginx and start $app"
|
||||
systemctl reload nginx
|
||||
systemctl start $app
|
||||
|
||||
|
|
|
@ -14,11 +14,8 @@ source /usr/share/yunohost/helpers
|
|||
#=================================================
|
||||
|
||||
app=$YNH_APP_INSTANCE_NAME
|
||||
|
||||
domain=$(ynh_app_setting_get $app domain)
|
||||
port=$(ynh_app_setting_get $app port)
|
||||
db_name=$(ynh_app_setting_get $app db_name)
|
||||
db_user=$db_name
|
||||
final_path=$(ynh_app_setting_get $app final_path)
|
||||
|
||||
#=================================================
|
||||
|
@ -28,6 +25,7 @@ final_path=$(ynh_app_setting_get $app final_path)
|
|||
#=================================================
|
||||
|
||||
# Remove the dedicated systemd config
|
||||
ynh_print_info "Removing systemd"
|
||||
ynh_remove_systemd_config
|
||||
|
||||
#=================================================
|
||||
|
@ -46,6 +44,7 @@ fi
|
|||
#=================================================
|
||||
|
||||
# Remove metapackage and its dependencies
|
||||
ynh_print_info "Removing dependencies"
|
||||
ynh_remove_app_dependencies
|
||||
|
||||
|
||||
|
@ -54,6 +53,7 @@ ynh_remove_app_dependencies
|
|||
#=================================================
|
||||
|
||||
# Remove the app directory securely
|
||||
ynh_print_info "Removing $final_path"
|
||||
ynh_secure_remove "$final_path"
|
||||
|
||||
#=================================================
|
||||
|
@ -61,6 +61,7 @@ ynh_secure_remove "$final_path"
|
|||
#=================================================
|
||||
|
||||
# Remove the dedicated nginx config
|
||||
ynh_print_info "Removing nginx"
|
||||
ynh_remove_nginx_config
|
||||
|
||||
#=================================================
|
||||
|
@ -76,6 +77,7 @@ ynh_remove_logrotate
|
|||
|
||||
if yunohost firewall list | grep -q "\- $port$"
|
||||
then
|
||||
ynh_print_info "Removing open port $port"
|
||||
echo "Close port $port" >&2
|
||||
yunohost firewall disallow TCP $port 2>&1
|
||||
fi
|
||||
|
|
Loading…
Add table
Reference in a new issue