1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/ffsync_ynh.git synced 2024-09-03 18:26:38 +02:00

Fix package linter and update install badge

This commit is contained in:
Josué Tille 2020-12-12 15:00:34 +01:00
parent 0174f92354
commit 2317852375
No known key found for this signature in database
GPG key ID: 716A6C99B04194EF
5 changed files with 10 additions and 22 deletions

View file

@ -1,7 +1,7 @@
# Mozillas Sync Server for Yunohost # Mozillas Sync Server for Yunohost
[![Integration level](https://dash.yunohost.org/integration/ffsync.svg)](https://dash.yunohost.org/appci/app/ffsync) ![](https://ci-apps.yunohost.org/ci/badges/ffsync.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/ffsync.maintain.svg) [![Integration level](https://dash.yunohost.org/integration/ffsync.svg)](https://dash.yunohost.org/appci/app/ffsync) ![](https://ci-apps.yunohost.org/ci/badges/ffsync.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/ffsync.maintain.svg)
[![Install ffsync with YunoHost](https://install-app.yunohost.org/install-with-yunohost.png)](https://install-app.yunohost.org/?app=ffsync) [![Install ffsync with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=ffsync)
*[Lire ce readme en français.](./README_fr.md)* *[Lire ce readme en français.](./README_fr.md)*
> *This package allow you to install ffsync quickly and simply on a YunoHost server. > *This package allow you to install ffsync quickly and simply on a YunoHost server.

View file

@ -1,7 +1,7 @@
# Serveur de synchronisation de Firefox pour Yunohost # Serveur de synchronisation de Firefox pour Yunohost
[![Integration level](https://dash.yunohost.org/integration/ffsync.svg)](https://dash.yunohost.org/appci/app/ffsync) [![Integration level](https://dash.yunohost.org/integration/ffsync.svg)](https://dash.yunohost.org/appci/app/ffsync)
[![Install ffsync with YunoHost](https://install-app.yunohost.org/install-with-yunohost.png)](https://install-app.yunohost.org/?app=ffsync) [![Install ffsync with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=ffsync)
*[Read this readme in english.](./README.md)* *[Read this readme in english.](./README.md)*
> *Ce package vous permet d'installer ffsync rapidement et simplement sur un serveur Yunohost. > *Ce package vous permet d'installer ffsync rapidement et simplement sur un serveur Yunohost.

View file

@ -20,7 +20,7 @@ ynh_abort_if_errors
#================================================= #=================================================
# LOAD SETTINGS # LOAD SETTINGS
#================================================= #=================================================
ynh_script_progression --message="Loading installation settings..." ynh_print_info --message="Loading installation settings..."
app=$YNH_APP_INSTANCE_NAME app=$YNH_APP_INSTANCE_NAME
@ -33,30 +33,30 @@ db_name=$(ynh_app_setting_get --app=$app --key=db_name)
#================================================= #=================================================
# BACKUP THE APP MAIN DIR # BACKUP THE APP MAIN DIR
#================================================= #=================================================
ynh_script_progression --message="Backing up the main app directory..." ynh_print_info --message="Backing up the main app directory..."
ynh_backup --src_path="$final_path" ynh_backup --src_path="$final_path"
#================================================= #=================================================
# BACKUP THE NGINX CONFIGURATION # BACKUP THE NGINX CONFIGURATION
#================================================= #=================================================
ynh_script_progression --message="Backing up nginx web server configuration..." ynh_print_info --message="Backing up nginx web server 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 THE MYSQL DATABASE # BACKUP THE MYSQL DATABASE
#================================================= #=================================================
ynh_script_progression --message="Backing up the MySQL database..." ynh_print_info --message="Backing up the MySQL database..."
ynh_mysql_dump_db --database="$db_name" > db.sql ynh_mysql_dump_db --database="$db_name" > db.sql
#================================================= #=================================================
# SPECIFIC BACKUP # SPECIFIC BACKUP
#================================================= #=================================================
# Backup Log # Backup Log
ynh_script_progression --message="Backing up logs" ynh_print_info --message="Backing up logs"
ynh_backup --src_path="/var/log/uwsgi/$app" ynh_backup --src_path="/var/log/uwsgi/$app"
# BACKUP THE UWSGI FILES # BACKUP THE UWSGI FILES
ynh_script_progression --message="Backing up UWSGI..." ynh_print_info --message="Backing up UWSGI..."
ynh_backup --src_path="/etc/uwsgi/apps-available/$app.ini" ynh_backup --src_path="/etc/uwsgi/apps-available/$app.ini"
ynh_backup --src_path="/etc/systemd/system/uwsgi-app@.service" ynh_backup --src_path="/etc/systemd/system/uwsgi-app@.service"
@ -64,4 +64,4 @@ ynh_backup --src_path="/etc/systemd/system/uwsgi-app@.service"
# END OF SCRIPT # END OF SCRIPT
#================================================= #=================================================
ynh_script_progression --message="Backup script completed for $app. (YunoHost will then actually copy those files to the archive)." --last ynh_print_info --message="Backup script completed for $app. (YunoHost will then actually copy those files to the archive)."

View file

@ -24,17 +24,6 @@ final_path=$(ynh_app_setting_get --app=$app --key=final_path)
#================================================= #=================================================
# STANDARD REMOVE # STANDARD REMOVE
#=================================================
# REMOVE UWSGI
#=================================================
# Remove the service from the list of services known by Yunohost (added from `yunohost service add`)
if ynh_exec_warn_less yunohost service status uwsgi-app@$app >/dev/null
then
ynh_print_info --message="Removing $app service..."
yunohost service remove uwsgi-app@$app
fi
#================================================= #=================================================
# STOP AND REMOVE SERVICE # STOP AND REMOVE SERVICE
#================================================= #=================================================

View file

@ -81,12 +81,11 @@ ynh_mysql_connect_as --user=$db_user --password=$db_pwd --database=$db_name < ./
# INTEGRATE SERVICE IN YUNOHOST # INTEGRATE SERVICE IN YUNOHOST
#================================================= #=================================================
yunohost service add "uwsgi-app@$app" --log "/var/log/uwsgi/app/$app"
ynh_script_progression --message="Reloading services..." --weight=3 ynh_script_progression --message="Reloading services..." --weight=3
ynh_check_global_uwsgi_config ynh_check_global_uwsgi_config
systemctl enable "uwsgi-app@$app" --quiet systemctl enable "uwsgi-app@$app" --quiet
yunohost service add "uwsgi-app@$app" --log "/var/log/uwsgi/$app/$app.log"
#================================================= #=================================================
# GENERIC FINALIZATION # GENERIC FINALIZATION