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

Merge pull request #123 from YunoHost-Apps/testing

Testing
This commit is contained in:
Éric Gaspar 2021-01-24 16:36:59 +01:00 committed by GitHub
commit 7b1dbac739
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 13 additions and 33 deletions

View file

@ -1,7 +1,7 @@
# Etherpad with MyPads plugin for YunoHost
[![Integration level](https://dash.yunohost.org/integration/etherpad_mypads.svg)](https://dash.yunohost.org/appci/app/etherpad_mypads) ![](https://ci-apps.yunohost.org/ci/badges/etherpad_mypads.status.svg) [![](https://ci-apps.yunohost.org/ci/badges/etherpad_mypads.maintain.svg)](https://github.com/YunoHost/Apps/#what-to-do-if-i-cant-maintain-my-app-anymore-)
[![Install Etherpad with YunoHost](https://install-app.yunohost.org/install-with-yunohost.png)](https://install-app.yunohost.org/?app=etherpad_mypads)
[![Install Etherpad with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=etherpad_mypads)
*[Lire ce readme en français.](./README_fr.md)*

View file

@ -1,7 +1,7 @@
# Etherpad avec plugin MyPads pour YunoHost
[![Niveau d'intégration](https://dash.yunohost.org/integration/etherpad_mypads.svg)](https://dash.yunohost.org/appci/app/etherpad_mypads) ![](https://ci-apps.yunohost.org/ci/badges/etherpad_mypads.status.svg) [![](https://ci-apps.yunohost.org/ci/badges/etherpad_mypads.maintain.svg)](https://github.com/YunoHost/Apps/#what-to-do-if-i-cant-maintain-my-app-anymore-)
[![Installer Etherpad avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.png)](https://install-app.yunohost.org/?app=etherpad_mypads)
[![Installer Etherpad avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=etherpad_mypads)
*[Read this readme in english.](./README.md)*

View file

@ -37,7 +37,7 @@
setup_public=1
upgrade=1
backup_restore=1
multi_instance=0
multi_instance=1
port_already_use=1 (9001)
change_url=1
actions=1
@ -85,8 +85,6 @@
useldap=0
; Checks
setup_root=1
;;; Levels
Level 5=auto
;;; Options
Email=
Notification=change

View file

@ -6,7 +6,7 @@
"en": "Online editor providing collaborative editing in real-time.",
"fr": "Éditeur en ligne fournissant l'édition collaborative en temps réel."
},
"version": "1.8.4~ynh1",
"version": "1.8.4~ynh2",
"url": "https://framapad.org",
"license": "Apache-2.0",
"maintainer": {
@ -18,7 +18,7 @@
"email": "maniackc_dev@crudelis.fr"
}],
"requirements": {
"yunohost": ">= 3.6"
"yunohost": ">= 3.8.1"
},
"multi_instance": true,
"services": [

View file

@ -4,28 +4,6 @@
# PERSONAL HELPERS
#=================================================
#=================================================
# BACKUP
#=================================================
HUMAN_SIZE () { # Transforme une taille en Ko en une taille lisible pour un humain
human=$(numfmt --to=iec --from-unit=1K $1)
echo $human
}
CHECK_SIZE () { # Vérifie avant chaque backup que l'espace est suffisant
file_to_analyse=$1
backup_size=$(du --summarize "$file_to_analyse" | cut -f1)
free_space=$(df --output=avail "/home/yunohost.backup" | sed 1d)
if [ $free_space -le $backup_size ]
then
ynh_print_err "Espace insuffisant pour sauvegarder $file_to_analyse."
ynh_print_err "Espace disponible : $(HUMAN_SIZE $free_space)"
ynh_die "Espace nécessaire : $(HUMAN_SIZE $backup_size)"
fi
}
#=================================================
# FUTUR OFFICIAL HELPERS
#=================================================

View file

@ -36,7 +36,6 @@ ynh_print_info --message="Declaring files to be backed up..."
# BACKUP THE APP MAIN DIR
#=================================================
CHECK_SIZE "$final_path"
ynh_backup --src_path="$final_path"
#=================================================
@ -51,7 +50,6 @@ ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf"
ynh_print_info --message="Backing up the MySQL database..."
ynh_mysql_dump_db --database="$db_name" > db.sql
CHECK_SIZE "db.sql"
#=================================================
# SPECIFIC BACKUP

View file

@ -81,7 +81,7 @@ ynh_app_setting_set --app=$app --key=overwrite_systemd --value="1"
#=================================================
# FIND AND OPEN A PORT
#=================================================
ynh_script_progression --message="Configuring firewall..." --weight=2
ynh_script_progression --message="Finding an available port..." --weight=2
# Find a free port
port=$(ynh_find_port --port=9001)

View file

@ -149,7 +149,7 @@ yunohost service add $app --log "/var/log/$app/etherpad.log"
ynh_script_progression --message="Restoring the systemd configuration..."
ynh_restore_file --origin_path="/etc/systemd/system/$app.service"
systemctl enable $app.service
systemctl enable $app.service --quiet
#=================================================
# RESTORE FAIL2BAN CONFIGURATION

View file

@ -358,6 +358,12 @@ chmod 600 "$final_path/credentials.json"
# Restrict access to credentials.json
chown $app -R /var/log/$app/etherpad.log
#=================================================
# ADVERTISE SERVICE IN ADMIN PANEL
#=================================================
yunohost service add $app --log "/var/log/$app/etherpad.log"
#=================================================
# UPGRADE FAIL2BAN
#=================================================