diff --git a/README.md b/README.md
index db96675..9b9ffeb 100644
--- a/README.md
+++ b/README.md
@@ -18,7 +18,7 @@ It shall NOT be edited by hand.
Baïkal is a lightweight CalDAV+CardDAV server. It offers an extensive web interface with easy management of users, address books and calendars. It is fast and simple to install and only needs a basic PHP capable server. The data are stored in a MySQL database. Baïkal allows to seamlessly access your contacts and calendars from every device. It is compatible with iOS, macOS, DAVx5 on Android, Mozilla Thunderbird and every other CalDAV and CardDAV capable application. Protect your privacy by hosting calendars and contacts yourself with Baïkal.
-**Shipped version:** 0.9.4~ynh1
+**Shipped version:** 0.9.4~ynh2
**Demo:**
@@ -29,7 +29,7 @@ Baïkal is a lightweight CalDAV+CardDAV server. It offers an extensive web inter
## Documentation and resources
- Official app website:
-- Official user documentation:
+- Official user documentation:
- Official admin documentation:
- Upstream app code repository:
- YunoHost Store:
diff --git a/README_es.md b/README_es.md
index 8bf7fdb..e45ec54 100644
--- a/README_es.md
+++ b/README_es.md
@@ -18,7 +18,7 @@ No se debe editar a mano.
Baïkal is a lightweight CalDAV+CardDAV server. It offers an extensive web interface with easy management of users, address books and calendars. It is fast and simple to install and only needs a basic PHP capable server. The data are stored in a MySQL database. Baïkal allows to seamlessly access your contacts and calendars from every device. It is compatible with iOS, macOS, DAVx5 on Android, Mozilla Thunderbird and every other CalDAV and CardDAV capable application. Protect your privacy by hosting calendars and contacts yourself with Baïkal.
-**Versión actual:** 0.9.4~ynh1
+**Versión actual:** 0.9.4~ynh2
**Demo:**
@@ -29,7 +29,7 @@ Baïkal is a lightweight CalDAV+CardDAV server. It offers an extensive web inter
## Documentaciones y recursos
- Sitio web oficial:
-- Documentación usuario oficial:
+- Documentación usuario oficial:
- Documentación administrador oficial:
- Repositorio del código fuente oficial de la aplicación :
- Catálogo YunoHost:
diff --git a/README_eu.md b/README_eu.md
index bfa14b1..4610541 100644
--- a/README_eu.md
+++ b/README_eu.md
@@ -18,7 +18,7 @@ EZ editatu eskuz.
Baïkal is a lightweight CalDAV+CardDAV server. It offers an extensive web interface with easy management of users, address books and calendars. It is fast and simple to install and only needs a basic PHP capable server. The data are stored in a MySQL database. Baïkal allows to seamlessly access your contacts and calendars from every device. It is compatible with iOS, macOS, DAVx5 on Android, Mozilla Thunderbird and every other CalDAV and CardDAV capable application. Protect your privacy by hosting calendars and contacts yourself with Baïkal.
-**Paketatutako bertsioa:** 0.9.4~ynh1
+**Paketatutako bertsioa:** 0.9.4~ynh2
**Demoa:**
@@ -29,7 +29,7 @@ Baïkal is a lightweight CalDAV+CardDAV server. It offers an extensive web inter
## Dokumentazioa eta baliabideak
- Aplikazioaren webgune ofiziala:
-- Erabiltzaileen dokumentazio ofiziala:
+- Erabiltzaileen dokumentazio ofiziala:
- Administratzaileen dokumentazio ofiziala:
- Jatorrizko aplikazioaren kode-gordailua:
- YunoHost Denda:
diff --git a/README_fr.md b/README_fr.md
index b412c57..5da83b1 100644
--- a/README_fr.md
+++ b/README_fr.md
@@ -18,7 +18,7 @@ Il NE doit PAS être modifié à la main.
Baïkal est un serveur léger CalDAV+CardDAV. Il offre une interface Web étendue avec une gestion facile des utilisateurs, des carnets d'adresses et des calendriers. Il est rapide et simple à installer et ne nécessite qu'un serveur de base. Les données sont stockées dans une base de données MySQL. Baïkal permet d'accéder de manière transparente à vos contacts et calendriers depuis n'importe quel appareil. Il est compatible avec iOS, macOS, DAVx5 sur Android, Mozilla Thunderbird et toutes les autres applications compatibles CalDAV et CardDAV. Protégez votre vie privée en hébergeant vous-même des calendriers et contacts avec Baïkal.
-**Version incluse :** 0.9.4~ynh1
+**Version incluse :** 0.9.4~ynh2
**Démo :**
@@ -29,7 +29,7 @@ Baïkal est un serveur léger CalDAV+CardDAV. Il offre une interface Web étendu
## Documentations et ressources
- Site officiel de l’app :
-- Documentation officielle utilisateur :
+- Documentation officielle utilisateur :
- Documentation officielle de l’admin :
- Dépôt de code officiel de l’app :
- YunoHost Store :
diff --git a/README_gl.md b/README_gl.md
index caa8032..534d7a2 100644
--- a/README_gl.md
+++ b/README_gl.md
@@ -18,7 +18,7 @@ NON debe editarse manualmente.
Baïkal is a lightweight CalDAV+CardDAV server. It offers an extensive web interface with easy management of users, address books and calendars. It is fast and simple to install and only needs a basic PHP capable server. The data are stored in a MySQL database. Baïkal allows to seamlessly access your contacts and calendars from every device. It is compatible with iOS, macOS, DAVx5 on Android, Mozilla Thunderbird and every other CalDAV and CardDAV capable application. Protect your privacy by hosting calendars and contacts yourself with Baïkal.
-**Versión proporcionada:** 0.9.4~ynh1
+**Versión proporcionada:** 0.9.4~ynh2
**Demo:**
@@ -29,7 +29,7 @@ Baïkal is a lightweight CalDAV+CardDAV server. It offers an extensive web inter
## Documentación e recursos
- Web oficial da app:
-- Documentación oficial para usuarias:
+- Documentación oficial para usuarias:
- Documentación oficial para admin:
- Repositorio de orixe do código:
- Tenda YunoHost:
diff --git a/README_zh_Hans.md b/README_zh_Hans.md
index 2ed70aa..7d15fb4 100644
--- a/README_zh_Hans.md
+++ b/README_zh_Hans.md
@@ -18,7 +18,7 @@
Baïkal is a lightweight CalDAV+CardDAV server. It offers an extensive web interface with easy management of users, address books and calendars. It is fast and simple to install and only needs a basic PHP capable server. The data are stored in a MySQL database. Baïkal allows to seamlessly access your contacts and calendars from every device. It is compatible with iOS, macOS, DAVx5 on Android, Mozilla Thunderbird and every other CalDAV and CardDAV capable application. Protect your privacy by hosting calendars and contacts yourself with Baïkal.
-**分发版本:** 0.9.4~ynh1
+**分发版本:** 0.9.4~ynh2
**演示:**
@@ -29,7 +29,7 @@ Baïkal is a lightweight CalDAV+CardDAV server. It offers an extensive web inter
## 文档与资源
- 官方应用网站:
-- 官方用户文档:
+- 官方用户文档:
- 官方管理文档:
- 上游应用代码库:
- YunoHost 商店:
diff --git a/manifest.toml b/manifest.toml
index dc1d67a..d214582 100644
--- a/manifest.toml
+++ b/manifest.toml
@@ -7,16 +7,16 @@ name = "Baïkal"
description.en = "Lightweight CalDAV and CardDAV server"
description.fr = "Serveur CalDAV et CardDAV léger"
-version = "0.9.4~ynh1"
+version = "0.9.4~ynh2"
-maintainers = []
+maintainers = ["salamandar"]
[upstream]
license = "GPL-3.0"
website = "https://sabre.io/baikal/"
demo = "https://demo.yunohost.org/baikal/admin/"
admindoc = "https://sabre.io/dav/"
-userdoc = "https://github.com/AlexandreMonroche/BaikalGuide"
+userdoc = "https://sabre.io/baikal/install/"
code = "https://github.com/sabre-io/Baikal"
[integration]
diff --git a/scripts/_common.sh b/scripts/_common.sh
index f74169b..0cb0789 100644
--- a/scripts/_common.sh
+++ b/scripts/_common.sh
@@ -3,8 +3,6 @@
#=================================================
# COMMON VARIABLES
#=================================================
-# PHP APP SPECIFIC
-#=================================================
#=================================================
# PERSONAL HELPERS
diff --git a/scripts/backup b/scripts/backup
index 04eed75..2f4bc70 100644
--- a/scripts/backup
+++ b/scripts/backup
@@ -1,7 +1,5 @@
#!/bin/bash
-#=================================================
-# GENERIC START
#=================================================
# IMPORT GENERIC HELPERS
#=================================================
@@ -22,21 +20,13 @@ ynh_print_info --message="Declaring files to be backed up..."
ynh_backup --src_path="$install_dir"
#=================================================
-# BACKUP THE NGINX CONFIGURATION
+# SYSTEM CONFIGURATION
#=================================================
ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf"
-#=================================================
-# BACKUP THE PHP-FPM CONFIGURATION
-#=================================================
-
ynh_backup --src_path="/etc/php/$phpversion/fpm/pool.d/$app.conf"
-#=================================================
-# BACKUP FAIL2BAN CONFIGURATION
-#=================================================
-
ynh_backup --src_path="/etc/fail2ban/jail.d/$app.conf"
ynh_backup --src_path="/etc/fail2ban/filter.d/$app.conf"
diff --git a/scripts/change_url b/scripts/change_url
index 2ad973b..cb2b45a 100644
--- a/scripts/change_url
+++ b/scripts/change_url
@@ -1,7 +1,5 @@
#!/bin/bash
-#=================================================
-# GENERIC STARTING
#=================================================
# IMPORT GENERIC HELPERS
#=================================================
@@ -22,8 +20,6 @@ then
fi
fi
-#=================================================
-# STANDARD MODIFICATIONS
#=================================================
# MODIFY URL IN NGINX CONF
#=================================================
@@ -31,8 +27,6 @@ ynh_script_progression --message="Updating NGINX web server configuration..." --
ynh_change_url_nginx_config
-#=================================================
-# SPECIFIC MODIFICATIONS
#=================================================
# UPDATE CONFIGURATION
#=================================================
diff --git a/scripts/install b/scripts/install
index d9ba7fc..0f11817 100644
--- a/scripts/install
+++ b/scripts/install
@@ -1,7 +1,5 @@
#!/bin/bash
-#=================================================
-# GENERIC START
#=================================================
# IMPORT GENERIC HELPERS
#=================================================
@@ -10,13 +8,16 @@ source _common.sh
source /usr/share/yunohost/helpers
#=================================================
-# RETRIEVE ARGUMENTS FROM THE MANIFEST
+# INITIALIZE AND STORE SETTINGS
#=================================================
timezone=$(cat /etc/timezone)
encrypt_key=$(ynh_string_random 24)
password_hash=$(echo -n admin:BaikalDAV:$password | sha256sum | cut -d ' ' -f 1)
+ynh_app_setting_set --app="$app" --key="encrypt_key" --value="$encrypt_key"
+ynh_app_setting_set --app="$app" --key="password_hash" --value="$password_hash"
+
#=================================================
# CHECK IF THE APP CAN BE INSTALLED WITH THESE ARGS
#=================================================
@@ -28,14 +29,6 @@ then
ynh_die --message="Another app already uses the domain $domain to serve a calDAV/cardDAV feature. Please use another domain."
fi
-#=================================================
-# STORE SETTINGS FROM MANIFEST
-#=================================================
-ynh_script_progression --message="Storing installation settings..." --weight=2
-
-ynh_app_setting_set --app=$app --key=encrypt_key --value="$encrypt_key"
-ynh_app_setting_set --app=$app --key=password_hash --value="$password_hash"
-
#=================================================
# DOWNLOAD, CHECK AND UNPACK SOURCE
#=================================================
@@ -44,7 +37,7 @@ ynh_script_progression --message="Setting up source files..." --weight=8
ynh_setup_source --dest_dir="$install_dir"
chmod -R o-rwx "$install_dir"
-chown -R $app:www-data "$install_dir"
+chown -R "$app:www-data" "$install_dir"
#=================================================
# SYSTEM CONFIGURATION
@@ -55,19 +48,12 @@ ynh_add_fpm_config
ynh_add_nginx_config
-#=================================================
-# SETUP FAIL2BAN
-#=================================================
-ynh_script_progression --message="Configuring fail2ban..." --weight=1
-
# Create the logfile, required before configuring fail2ban
touch "/var/log/nginx/${domain}-error.log"
# Create a dedicated fail2ban config
ynh_add_fail2ban_config --logpath="/var/log/nginx/${domain}-error.log" --failregex='"PHP message: user \(name stripped-out\) authentication failure for Baikal" while reading response header from upstream, client: '
-#=================================================
-# SPECIFIC SETUP
#=================================================
# INITIALIZE DATABASE
#=================================================
diff --git a/scripts/remove b/scripts/remove
index 8d28c8c..216843d 100644
--- a/scripts/remove
+++ b/scripts/remove
@@ -1,7 +1,5 @@
#!/bin/bash
-#=================================================
-# GENERIC START
#=================================================
# IMPORT GENERIC HELPERS
#=================================================
diff --git a/scripts/restore b/scripts/restore
index 77daf9b..47121dd 100644
--- a/scripts/restore
+++ b/scripts/restore
@@ -1,7 +1,5 @@
#!/bin/bash
-#=================================================
-# GENERIC START
#=================================================
# IMPORT GENERIC HELPERS
#=================================================
@@ -55,14 +53,12 @@ ynh_restore_file --origin_path="/etc/fail2ban/jail.d/$app.conf"
ynh_restore_file --origin_path="/etc/fail2ban/filter.d/$app.conf"
ynh_systemd_action --action=restart --service_name=fail2ban
-#=================================================
-# GENERIC FINALIZATION
#=================================================
# RELOAD NGINX AND PHP-FPM OR THE APP SERVICE
#=================================================
ynh_script_progression --message="Reloading NGINX web server and $app's service..." --weight=1
-ynh_systemd_action --service_name=php$phpversion-fpm --action=reload
+ynh_systemd_action --service_name="php$phpversion-fpm" --action=reload
ynh_systemd_action --service_name=nginx --action=reload
#=================================================
diff --git a/scripts/upgrade b/scripts/upgrade
index b3ea522..c443ba4 100644
--- a/scripts/upgrade
+++ b/scripts/upgrade
@@ -1,7 +1,5 @@
#!/bin/bash
-#=================================================
-# GENERIC START
#=================================================
# IMPORT GENERIC HELPERS
#=================================================
@@ -9,30 +7,22 @@
source _common.sh
source /usr/share/yunohost/helpers
-#=================================================
-# CHECK VERSION
-#=================================================
-
-upgrade_type=$(ynh_check_app_version_changed)
+timezone=$(cat /etc/timezone)
#=================================================
# DOWNLOAD, CHECK AND UNPACK SOURCE
#=================================================
+ynh_script_progression --message="Upgrading source files..." --weight=3
-if [ "$upgrade_type" == "UPGRADE_APP" ]
-then
- ynh_script_progression --message="Upgrading source files..." --weight=3
-
- ynh_setup_source --dest_dir="$install_dir" --keep="config/baikal.yaml"
-fi
+ynh_setup_source --dest_dir="$install_dir" --keep="config/baikal.yaml"
chmod -R o-rwx "$install_dir"
-chown -R $app:www-data "$install_dir"
+chown -R "$app:www-data" "$install_dir"
#=================================================
-# SYSTEM CONFIGURATION
+# REAPPLY SYSTEM CONFIGURATIONS
#=================================================
-ynh_script_progression --message="Upgrading PHP-FPM configuration..." --weight=2
+ynh_script_progression --message="Upgrading system configurations related to $app..." --weight=1
ynh_add_fpm_config
@@ -49,19 +39,14 @@ ynh_add_fail2ban_config --logpath="/var/log/nginx/${domain}-error.log" --failreg
#=================================================
# UPGRADE BAIKAL CONFIGURATION
#=================================================
+ynh_script_progression --message="Upgrading the configuration file..." --weight=2
# We keep this to allow upgrade the config file in case it needs to be changed.
-if [ "$upgrade_type" == "UPGRADE_APP" ]
-then
- ynh_script_progression --message="Upgrading the configuration file..." --weight=2
-
- timezone=$(cat /etc/timezone)
- path=${path%/}
- ynh_add_config --template="baikal.yaml" --destination="$install_dir/config/baikal.yaml"
- chown $app: "$install_dir/config/baikal.yaml"
- chmod 640 "$install_dir/config/baikal.yaml"
-fi
+path=${path%/}
+ynh_add_config --template="baikal.yaml" --destination="$install_dir/config/baikal.yaml"
+chown $app: "$install_dir/config/baikal.yaml"
+chmod 640 "$install_dir/config/baikal.yaml"
#=================================================
# END OF SCRIPT