[Earl] Board Active Cli

[Earl] Board Active Cli 1.0.0a

No tiene permiso para descargar
Compatibilidad con XF
  1. 2.2.x
Descripción breve
Automatically control your board with this add-on via command line interface for seamless database backup automation. Toggle "Board active" switch using shell scripts and cron jobs for efficient maintenance tasks.
This add-on allows you to turn your board on and off with command line interface.

So you can use this option to flip the "Board active" switch when you preparing to make a database backup and flip it back on when done.

You can automate the whole backup process by making a shell script like this and adding it to the crontab



Bash:

#!/usr/bin/env bash

############################################################################
# #
# SET VARS #
# #
############################################################################

vhost_path=/home/nginx/domains/yourdomain.com
public_doc_dir=$vhost_path/public
random_string=$(cat /dev/random | tr -dc '0-9' | fold -w 256 | head --bytes 7)
backup_dir=$public_doc_dir/backups/$(date +"%d-%m-%Y")/$random_string
elastic_snapshot_repo=/home/es_repo

dbuser=$(grep username $public_doc_dir/src/config.php | awk -F\' '{ print $6 }')
dbpass=$(grep password $public_doc_dir/src/config.php | awk -F\' '{ print $6 }')
dbname=$(grep dbname $public_doc_dir/src/config.php | awk -F\' '{ print $6 }')

############################################################################
# #
# BACKUP PROCESS #
# #
############################################################################

mkdir -p $backup_dir
# board active switch turns to off
/bin/env php $public_doc_dir/cmd.php xf:board-active off -m "Sorry for the inconvenience but we're performing some maintenance at the moment. we'll be back online shortly!"
mysqldump --opt --default-character-set=utf8mb4 -u$dbuser -p$dbpass $dbname > db$(date +"%d-%m-%Y").sql
....
...
..
# Board active switch turns to on and message sets back to the default
/bin/env php $public_doc_dir/cmd.php xf:board-active off -m "Sorry, we're currently unavailable. Please check back later.."
Autor
anne51
Vistas
465
Tipo de extensión
zip
Tamaño de archivo
6,7 KB
Primer lanzamiento
Última actualización
Valoraciones 0,00 estrella(s) 0 valoraciones
¿Enlace roto? Enviar mensaje al equipo NP y te ayudaremos rápidamente!
Apoia al desarrollador i estás satisfecho con la prueba o tu proyecto te ha generado ganancias, haz clic en el botón «Más información» para apoyar al desarrollador comprando.

Más recursos de anne51

Startli - Elementor Business Consulting WordPress Theme + RTL A
Startli is a modern and professional WordPress Consulting theme
Evne - Portafolio Creativo Tema WordPress A
para mentes audaces y creativas, Evne te permite crear tu propio portafolio de creatividad moderno de manera sencilla!
Hecxa – Agencia de Diseño Creativo FSE WordPress Tema A
Hecxa es un tema de WordPress moderno diseñado para Diseño Empresa, Estudio de Diseño, Diseñador Gráfico etc

Recursos similares

 /  Copiar a Portapapeles A
/ Copiar a Portapapeles 2.0.0 Patch Level 2
Añade una función de pegar en el portapapeles para tus bloques de código.
[OzzModz] Copy Message to Clipboard A
Adds a copy to clipboard button to messages.
[AndyB]  Remove click to expand A
Removes click to expand links in approval queue.
Atrás
Superior