mirror of
https://github.com/YunoHost-Apps/baikal_ynh.git
synced 2024-09-03 18:16:11 +02:00
commit
fb3ed52597
14 changed files with 33 additions and 86 deletions
|
@ -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.
|
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:** <https://demo.yunohost.org/baikal/admin/>
|
**Demo:** <https://demo.yunohost.org/baikal/admin/>
|
||||||
|
|
||||||
|
@ -29,7 +29,7 @@ Baïkal is a lightweight CalDAV+CardDAV server. It offers an extensive web inter
|
||||||
## Documentation and resources
|
## Documentation and resources
|
||||||
|
|
||||||
- Official app website: <https://sabre.io/baikal/>
|
- Official app website: <https://sabre.io/baikal/>
|
||||||
- Official user documentation: <https://github.com/AlexandreMonroche/BaikalGuide>
|
- Official user documentation: <https://sabre.io/baikal/install/>
|
||||||
- Official admin documentation: <https://sabre.io/dav/>
|
- Official admin documentation: <https://sabre.io/dav/>
|
||||||
- Upstream app code repository: <https://github.com/sabre-io/Baikal>
|
- Upstream app code repository: <https://github.com/sabre-io/Baikal>
|
||||||
- YunoHost Store: <https://apps.yunohost.org/app/baikal>
|
- YunoHost Store: <https://apps.yunohost.org/app/baikal>
|
||||||
|
|
|
@ -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.
|
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:** <https://demo.yunohost.org/baikal/admin/>
|
**Demo:** <https://demo.yunohost.org/baikal/admin/>
|
||||||
|
|
||||||
|
@ -29,7 +29,7 @@ Baïkal is a lightweight CalDAV+CardDAV server. It offers an extensive web inter
|
||||||
## Documentaciones y recursos
|
## Documentaciones y recursos
|
||||||
|
|
||||||
- Sitio web oficial: <https://sabre.io/baikal/>
|
- Sitio web oficial: <https://sabre.io/baikal/>
|
||||||
- Documentación usuario oficial: <https://github.com/AlexandreMonroche/BaikalGuide>
|
- Documentación usuario oficial: <https://sabre.io/baikal/install/>
|
||||||
- Documentación administrador oficial: <https://sabre.io/dav/>
|
- Documentación administrador oficial: <https://sabre.io/dav/>
|
||||||
- Repositorio del código fuente oficial de la aplicación : <https://github.com/sabre-io/Baikal>
|
- Repositorio del código fuente oficial de la aplicación : <https://github.com/sabre-io/Baikal>
|
||||||
- Catálogo YunoHost: <https://apps.yunohost.org/app/baikal>
|
- Catálogo YunoHost: <https://apps.yunohost.org/app/baikal>
|
||||||
|
|
|
@ -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.
|
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:** <https://demo.yunohost.org/baikal/admin/>
|
**Demoa:** <https://demo.yunohost.org/baikal/admin/>
|
||||||
|
|
||||||
|
@ -29,7 +29,7 @@ Baïkal is a lightweight CalDAV+CardDAV server. It offers an extensive web inter
|
||||||
## Dokumentazioa eta baliabideak
|
## Dokumentazioa eta baliabideak
|
||||||
|
|
||||||
- Aplikazioaren webgune ofiziala: <https://sabre.io/baikal/>
|
- Aplikazioaren webgune ofiziala: <https://sabre.io/baikal/>
|
||||||
- Erabiltzaileen dokumentazio ofiziala: <https://github.com/AlexandreMonroche/BaikalGuide>
|
- Erabiltzaileen dokumentazio ofiziala: <https://sabre.io/baikal/install/>
|
||||||
- Administratzaileen dokumentazio ofiziala: <https://sabre.io/dav/>
|
- Administratzaileen dokumentazio ofiziala: <https://sabre.io/dav/>
|
||||||
- Jatorrizko aplikazioaren kode-gordailua: <https://github.com/sabre-io/Baikal>
|
- Jatorrizko aplikazioaren kode-gordailua: <https://github.com/sabre-io/Baikal>
|
||||||
- YunoHost Denda: <https://apps.yunohost.org/app/baikal>
|
- YunoHost Denda: <https://apps.yunohost.org/app/baikal>
|
||||||
|
|
|
@ -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.
|
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 :** <https://demo.yunohost.org/baikal/admin/>
|
**Démo :** <https://demo.yunohost.org/baikal/admin/>
|
||||||
|
|
||||||
|
@ -29,7 +29,7 @@ Baïkal est un serveur léger CalDAV+CardDAV. Il offre une interface Web étendu
|
||||||
## Documentations et ressources
|
## Documentations et ressources
|
||||||
|
|
||||||
- Site officiel de l’app : <https://sabre.io/baikal/>
|
- Site officiel de l’app : <https://sabre.io/baikal/>
|
||||||
- Documentation officielle utilisateur : <https://github.com/AlexandreMonroche/BaikalGuide>
|
- Documentation officielle utilisateur : <https://sabre.io/baikal/install/>
|
||||||
- Documentation officielle de l’admin : <https://sabre.io/dav/>
|
- Documentation officielle de l’admin : <https://sabre.io/dav/>
|
||||||
- Dépôt de code officiel de l’app : <https://github.com/sabre-io/Baikal>
|
- Dépôt de code officiel de l’app : <https://github.com/sabre-io/Baikal>
|
||||||
- YunoHost Store : <https://apps.yunohost.org/app/baikal>
|
- YunoHost Store : <https://apps.yunohost.org/app/baikal>
|
||||||
|
|
|
@ -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.
|
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:** <https://demo.yunohost.org/baikal/admin/>
|
**Demo:** <https://demo.yunohost.org/baikal/admin/>
|
||||||
|
|
||||||
|
@ -29,7 +29,7 @@ Baïkal is a lightweight CalDAV+CardDAV server. It offers an extensive web inter
|
||||||
## Documentación e recursos
|
## Documentación e recursos
|
||||||
|
|
||||||
- Web oficial da app: <https://sabre.io/baikal/>
|
- Web oficial da app: <https://sabre.io/baikal/>
|
||||||
- Documentación oficial para usuarias: <https://github.com/AlexandreMonroche/BaikalGuide>
|
- Documentación oficial para usuarias: <https://sabre.io/baikal/install/>
|
||||||
- Documentación oficial para admin: <https://sabre.io/dav/>
|
- Documentación oficial para admin: <https://sabre.io/dav/>
|
||||||
- Repositorio de orixe do código: <https://github.com/sabre-io/Baikal>
|
- Repositorio de orixe do código: <https://github.com/sabre-io/Baikal>
|
||||||
- Tenda YunoHost: <https://apps.yunohost.org/app/baikal>
|
- Tenda YunoHost: <https://apps.yunohost.org/app/baikal>
|
||||||
|
|
|
@ -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.
|
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
|
||||||
|
|
||||||
**演示:** <https://demo.yunohost.org/baikal/admin/>
|
**演示:** <https://demo.yunohost.org/baikal/admin/>
|
||||||
|
|
||||||
|
@ -29,7 +29,7 @@ Baïkal is a lightweight CalDAV+CardDAV server. It offers an extensive web inter
|
||||||
## 文档与资源
|
## 文档与资源
|
||||||
|
|
||||||
- 官方应用网站: <https://sabre.io/baikal/>
|
- 官方应用网站: <https://sabre.io/baikal/>
|
||||||
- 官方用户文档: <https://github.com/AlexandreMonroche/BaikalGuide>
|
- 官方用户文档: <https://sabre.io/baikal/install/>
|
||||||
- 官方管理文档: <https://sabre.io/dav/>
|
- 官方管理文档: <https://sabre.io/dav/>
|
||||||
- 上游应用代码库: <https://github.com/sabre-io/Baikal>
|
- 上游应用代码库: <https://github.com/sabre-io/Baikal>
|
||||||
- YunoHost 商店: <https://apps.yunohost.org/app/baikal>
|
- YunoHost 商店: <https://apps.yunohost.org/app/baikal>
|
||||||
|
|
|
@ -7,16 +7,16 @@ name = "Baïkal"
|
||||||
description.en = "Lightweight CalDAV and CardDAV server"
|
description.en = "Lightweight CalDAV and CardDAV server"
|
||||||
description.fr = "Serveur CalDAV et CardDAV léger"
|
description.fr = "Serveur CalDAV et CardDAV léger"
|
||||||
|
|
||||||
version = "0.9.4~ynh1"
|
version = "0.9.4~ynh2"
|
||||||
|
|
||||||
maintainers = []
|
maintainers = ["salamandar"]
|
||||||
|
|
||||||
[upstream]
|
[upstream]
|
||||||
license = "GPL-3.0"
|
license = "GPL-3.0"
|
||||||
website = "https://sabre.io/baikal/"
|
website = "https://sabre.io/baikal/"
|
||||||
demo = "https://demo.yunohost.org/baikal/admin/"
|
demo = "https://demo.yunohost.org/baikal/admin/"
|
||||||
admindoc = "https://sabre.io/dav/"
|
admindoc = "https://sabre.io/dav/"
|
||||||
userdoc = "https://github.com/AlexandreMonroche/BaikalGuide"
|
userdoc = "https://sabre.io/baikal/install/"
|
||||||
code = "https://github.com/sabre-io/Baikal"
|
code = "https://github.com/sabre-io/Baikal"
|
||||||
|
|
||||||
[integration]
|
[integration]
|
||||||
|
|
|
@ -3,8 +3,6 @@
|
||||||
#=================================================
|
#=================================================
|
||||||
# COMMON VARIABLES
|
# COMMON VARIABLES
|
||||||
#=================================================
|
#=================================================
|
||||||
# PHP APP SPECIFIC
|
|
||||||
#=================================================
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# PERSONAL HELPERS
|
# PERSONAL HELPERS
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# GENERIC START
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# IMPORT GENERIC HELPERS
|
# IMPORT GENERIC HELPERS
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -22,21 +20,13 @@ ynh_print_info --message="Declaring files to be backed up..."
|
||||||
ynh_backup --src_path="$install_dir"
|
ynh_backup --src_path="$install_dir"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# BACKUP THE NGINX CONFIGURATION
|
# SYSTEM 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 PHP-FPM CONFIGURATION
|
|
||||||
#=================================================
|
|
||||||
|
|
||||||
ynh_backup --src_path="/etc/php/$phpversion/fpm/pool.d/$app.conf"
|
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/jail.d/$app.conf"
|
||||||
ynh_backup --src_path="/etc/fail2ban/filter.d/$app.conf"
|
ynh_backup --src_path="/etc/fail2ban/filter.d/$app.conf"
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# GENERIC STARTING
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# IMPORT GENERIC HELPERS
|
# IMPORT GENERIC HELPERS
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -22,8 +20,6 @@ then
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# STANDARD MODIFICATIONS
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# MODIFY URL IN NGINX CONF
|
# MODIFY URL IN NGINX CONF
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -31,8 +27,6 @@ ynh_script_progression --message="Updating NGINX web server configuration..." --
|
||||||
|
|
||||||
ynh_change_url_nginx_config
|
ynh_change_url_nginx_config
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# SPECIFIC MODIFICATIONS
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# UPDATE CONFIGURATION
|
# UPDATE CONFIGURATION
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# GENERIC START
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# IMPORT GENERIC HELPERS
|
# IMPORT GENERIC HELPERS
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -10,13 +8,16 @@ source _common.sh
|
||||||
source /usr/share/yunohost/helpers
|
source /usr/share/yunohost/helpers
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# RETRIEVE ARGUMENTS FROM THE MANIFEST
|
# INITIALIZE AND STORE SETTINGS
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
timezone=$(cat /etc/timezone)
|
timezone=$(cat /etc/timezone)
|
||||||
encrypt_key=$(ynh_string_random 24)
|
encrypt_key=$(ynh_string_random 24)
|
||||||
password_hash=$(echo -n admin:BaikalDAV:$password | sha256sum | cut -d ' ' -f 1)
|
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
|
# 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."
|
ynh_die --message="Another app already uses the domain $domain to serve a calDAV/cardDAV feature. Please use another domain."
|
||||||
fi
|
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
|
# 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"
|
ynh_setup_source --dest_dir="$install_dir"
|
||||||
|
|
||||||
chmod -R o-rwx "$install_dir"
|
chmod -R o-rwx "$install_dir"
|
||||||
chown -R $app:www-data "$install_dir"
|
chown -R "$app:www-data" "$install_dir"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# SYSTEM CONFIGURATION
|
# SYSTEM CONFIGURATION
|
||||||
|
@ -55,19 +48,12 @@ ynh_add_fpm_config
|
||||||
|
|
||||||
ynh_add_nginx_config
|
ynh_add_nginx_config
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# SETUP FAIL2BAN
|
|
||||||
#=================================================
|
|
||||||
ynh_script_progression --message="Configuring fail2ban..." --weight=1
|
|
||||||
|
|
||||||
# Create the logfile, required before configuring fail2ban
|
# Create the logfile, required before configuring fail2ban
|
||||||
touch "/var/log/nginx/${domain}-error.log"
|
touch "/var/log/nginx/${domain}-error.log"
|
||||||
|
|
||||||
# Create a dedicated fail2ban config
|
# 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: <HOST>'
|
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: <HOST>'
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# SPECIFIC SETUP
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# INITIALIZE DATABASE
|
# INITIALIZE DATABASE
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# GENERIC START
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# IMPORT GENERIC HELPERS
|
# IMPORT GENERIC HELPERS
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# GENERIC START
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# IMPORT GENERIC HELPERS
|
# 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_restore_file --origin_path="/etc/fail2ban/filter.d/$app.conf"
|
||||||
ynh_systemd_action --action=restart --service_name=fail2ban
|
ynh_systemd_action --action=restart --service_name=fail2ban
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# GENERIC FINALIZATION
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# RELOAD NGINX AND PHP-FPM OR THE APP SERVICE
|
# RELOAD NGINX AND PHP-FPM OR THE APP SERVICE
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Reloading NGINX web server and $app's service..." --weight=1
|
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
|
ynh_systemd_action --service_name=nginx --action=reload
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# GENERIC START
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# IMPORT GENERIC HELPERS
|
# IMPORT GENERIC HELPERS
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -9,30 +7,22 @@
|
||||||
source _common.sh
|
source _common.sh
|
||||||
source /usr/share/yunohost/helpers
|
source /usr/share/yunohost/helpers
|
||||||
|
|
||||||
#=================================================
|
timezone=$(cat /etc/timezone)
|
||||||
# CHECK VERSION
|
|
||||||
#=================================================
|
|
||||||
|
|
||||||
upgrade_type=$(ynh_check_app_version_changed)
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
||||||
#=================================================
|
#=================================================
|
||||||
|
ynh_script_progression --message="Upgrading source files..." --weight=3
|
||||||
|
|
||||||
if [ "$upgrade_type" == "UPGRADE_APP" ]
|
ynh_setup_source --dest_dir="$install_dir" --keep="config/baikal.yaml"
|
||||||
then
|
|
||||||
ynh_script_progression --message="Upgrading source files..." --weight=3
|
|
||||||
|
|
||||||
ynh_setup_source --dest_dir="$install_dir" --keep="config/baikal.yaml"
|
|
||||||
fi
|
|
||||||
|
|
||||||
chmod -R o-rwx "$install_dir"
|
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
|
ynh_add_fpm_config
|
||||||
|
|
||||||
|
@ -49,19 +39,14 @@ ynh_add_fail2ban_config --logpath="/var/log/nginx/${domain}-error.log" --failreg
|
||||||
#=================================================
|
#=================================================
|
||||||
# UPGRADE BAIKAL CONFIGURATION
|
# 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.
|
# We keep this to allow upgrade the config file in case it needs to be changed.
|
||||||
|
|
||||||
if [ "$upgrade_type" == "UPGRADE_APP" ]
|
path=${path%/}
|
||||||
then
|
ynh_add_config --template="baikal.yaml" --destination="$install_dir/config/baikal.yaml"
|
||||||
ynh_script_progression --message="Upgrading the configuration file..." --weight=2
|
chown $app: "$install_dir/config/baikal.yaml"
|
||||||
|
chmod 640 "$install_dir/config/baikal.yaml"
|
||||||
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
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# END OF SCRIPT
|
# END OF SCRIPT
|
||||||
|
|
Loading…
Add table
Reference in a new issue