mirror of
https://github.com/YunoHost-Apps/osada_ynh.git
synced 2024-09-03 19:46:30 +02:00
Fix
This commit is contained in:
parent
81e4171aca
commit
a58c0c01de
4 changed files with 23 additions and 24 deletions
|
@ -1,13 +1,8 @@
|
||||||
# See here for more information
|
|
||||||
# https://github.com/YunoHost/package_check#syntax-check_process-file
|
|
||||||
|
|
||||||
# Move this file from check_process.default to check_process when you have filled it.
|
|
||||||
|
|
||||||
;; Test complet
|
;; Test complet
|
||||||
; Manifest
|
; Manifest
|
||||||
domain="domain.tld" (DOMAIN)
|
domain="domain.tld"
|
||||||
admin="john" (USER)
|
admin="john"
|
||||||
database="1" (STRING)
|
database="1"
|
||||||
; Checks
|
; Checks
|
||||||
pkg_linter=1
|
pkg_linter=1
|
||||||
setup_sub_dir=0
|
setup_sub_dir=0
|
||||||
|
@ -19,7 +14,6 @@
|
||||||
#upgrade=1 from_commit=
|
#upgrade=1 from_commit=
|
||||||
backup_restore=1
|
backup_restore=1
|
||||||
multi_instance=1
|
multi_instance=1
|
||||||
port_already_use=0
|
|
||||||
change_url=0
|
change_url=0
|
||||||
;;; Options
|
;;; Options
|
||||||
Email=
|
Email=
|
||||||
|
|
|
@ -3,8 +3,8 @@
|
||||||
"id": "osada",
|
"id": "osada",
|
||||||
"name": "osada",
|
"name": "osada",
|
||||||
"description": {
|
"description": {
|
||||||
"en": "Osada is a decentralized publication platform and social network.",
|
"en": "Decentralized publication platform and social network",
|
||||||
"fr": "Osada est une plateforme de publication décentralisée et un réseau social."
|
"fr": "Plateforme de publication décentralisée et un réseau social"
|
||||||
},
|
},
|
||||||
"url": "http://zotlabs.com/osada/",
|
"url": "http://zotlabs.com/osada/",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
|
@ -15,12 +15,12 @@
|
||||||
},
|
},
|
||||||
"services": [
|
"services": [
|
||||||
"nginx",
|
"nginx",
|
||||||
"php7.0-fpm",
|
"php7.3-fpm",
|
||||||
"mysql",
|
"mysql",
|
||||||
"postgresql"
|
"postgresql"
|
||||||
],
|
],
|
||||||
"requirements": {
|
"requirements": {
|
||||||
"yunohost": ">= 4.0.0"
|
"yunohost": ">= 4.2.0"
|
||||||
},
|
},
|
||||||
"multi_instance": true,
|
"multi_instance": true,
|
||||||
"arguments": {
|
"arguments": {
|
||||||
|
|
|
@ -213,12 +213,14 @@ ynh_add_fpm_config --package="$extra_php_dependencies"
|
||||||
ynh_script_progression --message="Set right for Osada..."
|
ynh_script_progression --message="Set right for Osada..."
|
||||||
chown -R $app: $final_path
|
chown -R $app: $final_path
|
||||||
|
|
||||||
|
#=================================================
|
||||||
|
# SET CRON JOB
|
||||||
|
#=================================================
|
||||||
|
|
||||||
# Set up cron job
|
# Set up cron job
|
||||||
ynh_script_progression --message="Setting up cron job..."
|
ynh_add_config --template="../conf/poller-cron" --destination="/etc/cron.d/$app"
|
||||||
ynh_replace_string --match_string="YNH_WWW_PATH" --replace_string="$final_path" --target_file="../conf/poller-cron"
|
chown root: "/etc/cron.d/$app"
|
||||||
ynh_replace_string --match_string="__USER__" --replace_string="$app" --target_file="../conf/poller-cron"
|
chmod 644 "/etc/cron.d/$app"
|
||||||
ynh_replace_string --match_string="__PHP_VERSION__" --replace_string="$phpversion" --target_file="../conf/poller-cron"
|
|
||||||
cp ../conf/poller-cron /etc/cron.d/$app
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# STORE THE CONFIG FILE CHECKSUM
|
# STORE THE CONFIG FILE CHECKSUM
|
||||||
|
|
|
@ -192,18 +192,21 @@ ynh_script_progression --message="Upgrading logrotate configuration..."
|
||||||
# Use logrotate to manage app-specific logfile(s)
|
# Use logrotate to manage app-specific logfile(s)
|
||||||
ynh_use_logrotate --non-append
|
ynh_use_logrotate --non-append
|
||||||
|
|
||||||
|
#=================================================
|
||||||
# UPGRADE FAIL2BAN
|
# UPGRADE FAIL2BAN
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Re-configure Fail2Ban..."
|
ynh_script_progression --message="Re-configure Fail2Ban..."
|
||||||
|
|
||||||
ynh_add_fail2ban_config --logpath="$final_path/php.log" --failregex="^.*auth\.php.*failed login attempt.*from IP <HOST>.*$" --max_retry="5"
|
ynh_add_fail2ban_config --logpath="$final_path/php.log" --failregex="^.*auth\.php.*failed login attempt.*from IP <HOST>.*$" --max_retry="5"
|
||||||
|
|
||||||
# Set cron job
|
#=================================================
|
||||||
ynh_print_info "Setting up cron job..."
|
# UPGRADE CRON JOB
|
||||||
ynh_replace_string --match_string="YNH_WWW_PATH" --replace_string="$final_path" --target_file="../conf/poller-cron"
|
#=================================================
|
||||||
ynh_replace_string --match_string="__USER__" --replace_string="$app" --target_file="../conf/poller-cron"
|
|
||||||
ynh_replace_string --match_string="__PHP_VERSION__" --replace_string="$phpversion" --target_file="../conf/poller-cron"
|
# Set up cron job
|
||||||
cp -f ../conf/poller-cron /etc/cron.d/$app
|
ynh_add_config --template="../conf/poller-cron" --destination="/etc/cron.d/$app"
|
||||||
|
chown root: "/etc/cron.d/$app"
|
||||||
|
chmod 644 "/etc/cron.d/$app"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# UPGRADE DEPENDENCIES
|
# UPGRADE DEPENDENCIES
|
||||||
|
|
Loading…
Add table
Reference in a new issue