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
|
||||
; Manifest
|
||||
domain="domain.tld" (DOMAIN)
|
||||
admin="john" (USER)
|
||||
database="1" (STRING)
|
||||
domain="domain.tld"
|
||||
admin="john"
|
||||
database="1"
|
||||
; Checks
|
||||
pkg_linter=1
|
||||
setup_sub_dir=0
|
||||
|
@ -19,7 +14,6 @@
|
|||
#upgrade=1 from_commit=
|
||||
backup_restore=1
|
||||
multi_instance=1
|
||||
port_already_use=0
|
||||
change_url=0
|
||||
;;; Options
|
||||
Email=
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
"id": "osada",
|
||||
"name": "osada",
|
||||
"description": {
|
||||
"en": "Osada is a decentralized publication platform and social network.",
|
||||
"fr": "Osada est une plateforme de publication décentralisée et un réseau social."
|
||||
"en": "Decentralized publication platform and social network",
|
||||
"fr": "Plateforme de publication décentralisée et un réseau social"
|
||||
},
|
||||
"url": "http://zotlabs.com/osada/",
|
||||
"license": "MIT",
|
||||
|
@ -15,12 +15,12 @@
|
|||
},
|
||||
"services": [
|
||||
"nginx",
|
||||
"php7.0-fpm",
|
||||
"php7.3-fpm",
|
||||
"mysql",
|
||||
"postgresql"
|
||||
],
|
||||
"requirements": {
|
||||
"yunohost": ">= 4.0.0"
|
||||
"yunohost": ">= 4.2.0"
|
||||
},
|
||||
"multi_instance": true,
|
||||
"arguments": {
|
||||
|
|
|
@ -213,12 +213,14 @@ ynh_add_fpm_config --package="$extra_php_dependencies"
|
|||
ynh_script_progression --message="Set right for Osada..."
|
||||
chown -R $app: $final_path
|
||||
|
||||
#=================================================
|
||||
# SET CRON JOB
|
||||
#=================================================
|
||||
|
||||
# Set up cron job
|
||||
ynh_script_progression --message="Setting up 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"
|
||||
cp ../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"
|
||||
|
||||
#=================================================
|
||||
# STORE THE CONFIG FILE CHECKSUM
|
||||
|
|
|
@ -192,18 +192,21 @@ ynh_script_progression --message="Upgrading logrotate configuration..."
|
|||
# Use logrotate to manage app-specific logfile(s)
|
||||
ynh_use_logrotate --non-append
|
||||
|
||||
#=================================================
|
||||
# UPGRADE 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"
|
||||
|
||||
# Set cron job
|
||||
ynh_print_info "Setting up 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"
|
||||
cp -f ../conf/poller-cron /etc/cron.d/$app
|
||||
#=================================================
|
||||
# UPGRADE CRON JOB
|
||||
#=================================================
|
||||
|
||||
# Set up cron job
|
||||
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
|
||||
|
|
Loading…
Add table
Reference in a new issue