1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/sogo_ynh.git synced 2024-09-03 20:26:07 +02:00

Fix package linter and update install badge

This commit is contained in:
Josué Tille 2020-12-14 15:33:36 +01:00
parent 613caaee69
commit cc07f5da79
No known key found for this signature in database
GPG key ID: 716A6C99B04194EF
3 changed files with 21 additions and 45 deletions

View file

@ -2,7 +2,7 @@ SOGo for Yunohost
=================
[![Integration level](https://dash.yunohost.org/integration/sogo.svg)](https://dash.yunohost.org/appci/app/sogo) ![](https://ci-apps.yunohost.org/ci/badges/sogo.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/sogo.maintain.svg)
[![Install sogo with YunoHost](https://install-app.yunohost.org/install-with-yunohost.png)](https://install-app.yunohost.org/?app=sogo)
[![Install sogo with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=sogo)
> *This package allow you to install sogo quickly and simply on a YunoHost server.
If you don't have YunoHost, please see [here](https://yunohost.org/#/install) to know how to install and enjoy it.*

View file

@ -14,9 +14,6 @@ source /usr/share/yunohost/helpers
# Stop script if errors
ynh_abort_if_errors
#=================================================
# LOAD SETTINGS
#=================================================
ynh_print_info --message="Loading installation settings..."
# retrieve useful param
@ -24,47 +21,29 @@ domain=$(ynh_app_setting_get --app $app --key domain)
db_name=$(ynh_app_setting_get --app $app --key db_name)
#=================================================
# DECLARE DATA AND CONF FILES TO BACKUP
# STANDARD BACKUP STEPS
#=================================================
ynh_print_info --message="Declaring files to be backed up..."
#=================================================
ynh_print_info --message="Backing up configuration..."
# BACKUP THE NGINX CONFIGURATION
#=================================================
ynh_backup --src_path "/etc/nginx/conf.d/$domain.d/$app.conf"
ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf"
# Backup SOGo config
ynh_backup --src_path "/etc/$app"
#=================================================
# BACKUP SOGO CONFIG
#=================================================
ynh_backup --src_path="/etc/$app"
#=================================================
# BACKUP STUNNEL CONFIG
#=================================================
ynh_backup --src_path="/etc/stunnel/$app.conf"
#=================================================
# BACKUP VARIOUS FILES
#=================================================
# Backup stunnel config
ynh_backup --src_path "/etc/stunnel/$app.conf"
# Backup Cron
ynh_backup --src_path="/etc/cron.d/$app"
ynh_backup --src_path "/etc/cron.d/$app"
# Backup Logs
ynh_backup --src_path="/var/log/$app"
ynh_print_info --message="Backing up logs"
ynh_backup --src_path "/var/log/$app"
#=================================================
# BACKUP THE MYSQL DATABASE
#=================================================
ynh_print_info --message="Backing up database"
ynh_mysql_dump_db "$db_name" > db.sql
#=================================================
# END OF SCRIPT
#=================================================
ynh_print_info --message="Backup script completed for $app. (YunoHost will then actually copy those files to the archive)."

View file

@ -14,21 +14,18 @@ source /usr/share/yunohost/helpers
# Exit if an error occurs during the execution of the script
ynh_abort_if_errors
#=================================================
# LOAD SETTINGS
#=================================================
ynh_script_progression --message="Loading installation settings..."
# LOAD SETTINGS
domain=$(ynh_app_setting_get --app=$app --key=domain)
path_url=$(ynh_app_setting_get --app=$app --key=path)
admin=$(ynh_app_setting_get --app=$app --key=admin)
is_public=$(ynh_app_setting_get --app=$app --key=is_public)
port=$(ynh_app_setting_get --app=$app --key=web_port)
smtp_port=$(ynh_app_setting_get --app=$app --key=smtp_port)
db_name=$(ynh_app_setting_get --app=$app --key=db_name)
db_user=$(ynh_app_setting_get --app=$app --key=db_user)
db_pwd=$(ynh_app_setting_get --app=$app --key=mysqlpwd)
domain=$(ynh_app_setting_get --app $app --key domain)
path_url=$(ynh_normalize_url_path --path_url $(ynh_app_setting_get --app $app --key path))
admin=$(ynh_app_setting_get --app $app --key admin)
is_public=$(ynh_app_setting_get --app $app --key is_public)
port=$(ynh_app_setting_get --app $app --key web_port)
smtp_port=$(ynh_app_setting_get --app $app --key smtp_port)
db_name=$(ynh_app_setting_get --app $app --key db_name)
db_user=$(ynh_app_setting_get --app $app --key db_user)
db_pwd=$(ynh_app_setting_get --app $app --key mysqlpwd)
# Backup the current version of the app
ynh_backup_before_upgrade