mirror of
https://github.com/YunoHost-Apps/pytition_ynh.git
synced 2024-09-03 20:16:08 +02:00
Merge branch 'master' into service_integration
This commit is contained in:
commit
370d562e89
5 changed files with 40 additions and 29 deletions
|
@ -5,7 +5,7 @@
|
|||
|
||||
*[Read this readme in english.](./README.md)*
|
||||
|
||||
> *Ce package vous permet d'installer REPLACEBYYOURAPP rapidement et simplement sur un serveur Yunohost.
|
||||
> *Ce package vous permet d'installer REPLACEBYYOURAPP rapidement et simplement sur un serveur YunoHost.
|
||||
Si vous n'avez pas YunoHost, consultez [le guide](https://yunohost.org/#/install) pour apprendre comment l'installer.*
|
||||
|
||||
## Vue d'ensemble
|
||||
|
@ -34,12 +34,12 @@ Comment configurer cette application: via le panneau d'administration, un fichie
|
|||
|
||||
#### Support multi-utilisateur
|
||||
|
||||
L'authentification LDAP et HTTP est-elle prise en charge?
|
||||
L'application peut-elle être utilisée par plusieurs utilisateurs?
|
||||
* L'authentification LDAP et HTTP est-elle prise en charge ?
|
||||
* L'application peut-elle être utilisée par plusieurs utilisateurs ?
|
||||
|
||||
#### Architectures supportées
|
||||
|
||||
* x86-64b - [![Build Status](https://ci-apps.yunohost.org/ci/logs/REPLACEBYYOURAPP%20%28Apps%29.svg)](https://ci-apps.yunohost.org/ci/apps/REPLACEBYYOURAPP/)
|
||||
* x86-64 - [![Build Status](https://ci-apps.yunohost.org/ci/logs/REPLACEBYYOURAPP%20%28Apps%29.svg)](https://ci-apps.yunohost.org/ci/apps/REPLACEBYYOURAPP/)
|
||||
* ARMv8-A - [![Build Status](https://ci-apps-arm.yunohost.org/ci/logs/REPLACEBYYOURAPP%20%28Apps%29.svg)](https://ci-apps-arm.yunohost.org/ci/apps/REPLACEBYYOURAPP/)
|
||||
|
||||
## Limitations
|
||||
|
|
|
@ -83,11 +83,13 @@ ynh_backup --src_path="/etc/logrotate.d/$app"
|
|||
ynh_backup --src_path="/etc/systemd/system/$app.service"
|
||||
|
||||
#=================================================
|
||||
# BACKUP A CRON FILE
|
||||
# BACKUP VARIOUS FILES
|
||||
#=================================================
|
||||
|
||||
ynh_backup --src_path="/etc/cron.d/$app"
|
||||
|
||||
ynh_backup --src_path="/etc/$app/"
|
||||
|
||||
#=================================================
|
||||
# BACKUP THE MYSQL DATABASE
|
||||
#=================================================
|
||||
|
|
|
@ -112,7 +112,7 @@ ynh_remove_fail2ban_config
|
|||
#=================================================
|
||||
# SPECIFIC REMOVE
|
||||
#=================================================
|
||||
# REMOVE THE CRON FILE
|
||||
# REMOVE VARIOUS FILES
|
||||
#=================================================
|
||||
|
||||
# Remove a cron file
|
||||
|
|
|
@ -132,11 +132,13 @@ ynh_script_progression --message="Starting a systemd service..." --time --weight
|
|||
ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$app/$app.log"
|
||||
|
||||
#=================================================
|
||||
# RESTORE THE CRON FILE
|
||||
# RESTORE VARIOUS FILES
|
||||
#=================================================
|
||||
|
||||
ynh_restore_file --origin_path="/etc/cron.d/$app"
|
||||
|
||||
ynh_restore_file --origin_path="/etc/$app/"
|
||||
|
||||
#=================================================
|
||||
# RESTORE THE LOGROTATE CONFIGURATION
|
||||
#=================================================
|
||||
|
|
33
scripts/upgrade
Executable file → Normal file
33
scripts/upgrade
Executable file → Normal file
|
@ -146,6 +146,14 @@ ynh_add_fpm_config
|
|||
# ...
|
||||
#=================================================
|
||||
|
||||
#=================================================
|
||||
# SETUP SYSTEMD
|
||||
#=================================================
|
||||
ynh_script_progression --message="Upgrading systemd configuration..." --time --weight=1
|
||||
|
||||
# Create a dedicated systemd config
|
||||
ynh_add_systemd_config
|
||||
|
||||
#=================================================
|
||||
# MODIFY A CONFIG FILE
|
||||
#=================================================
|
||||
|
@ -159,6 +167,15 @@ ynh_replace_string --match_string="match_string" --replace_string="replace_strin
|
|||
# Recalculate and store the checksum of the file for the next upgrade.
|
||||
ynh_store_file_checksum --file="$final_path/CONFIG_FILE"
|
||||
|
||||
#=================================================
|
||||
# GENERIC FINALIZATION
|
||||
#=================================================
|
||||
# SECURE FILES AND DIRECTORIES
|
||||
#=================================================
|
||||
|
||||
# Set permissions on app files
|
||||
chown -R root: $final_path
|
||||
|
||||
#=================================================
|
||||
# SETUP LOGROTATE
|
||||
#=================================================
|
||||
|
@ -168,15 +185,12 @@ ynh_script_progression --message="Upgrading logrotate configuration..." --time -
|
|||
ynh_use_logrotate --non-append
|
||||
|
||||
#=================================================
|
||||
# SETUP SYSTEMD
|
||||
# START SYSTEMD SERVICE
|
||||
#=================================================
|
||||
ynh_script_progression --message="Upgrading systemd configuration..." --time --weight=1
|
||||
ynh_script_progression --message="Starting a systemd service..." --time --weight=1
|
||||
|
||||
# Create a dedicated systemd config
|
||||
ynh_add_systemd_config
|
||||
ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$app/$app.log"
|
||||
|
||||
#=================================================
|
||||
# GENERIC FINALIZATION
|
||||
#=================================================
|
||||
# UPGRADE FAIL2BAN
|
||||
#=================================================
|
||||
|
@ -185,13 +199,6 @@ ynh_script_progression --message="Reconfiguring fail2ban..." --time --weight=1
|
|||
# Create a dedicated fail2ban config
|
||||
ynh_add_fail2ban_config --logpath="/var/log/nginx/${domain}-error.log" --failregex="Regex to match into the log for a failed login"
|
||||
|
||||
#=================================================
|
||||
# SECURE FILES AND DIRECTORIES
|
||||
#=================================================
|
||||
|
||||
# Set permissions on app files
|
||||
chown -R root: $final_path
|
||||
|
||||
#=================================================
|
||||
# SETUP SSOWAT
|
||||
#=================================================
|
||||
|
|
Loading…
Reference in a new issue