[Earl] Board Active Cli

[Earl] Board Active Cli 1.0.0a

Vous n'avez pas l'autorisation de télécharger
Compatibilité XF
  1. 2.2.x
Description courte
This add-on allows you to turn your board on and off with command line interface.
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.."
Auteur
anne51
Vues
387
Type d’extension
zip
Taille du fichier
6.7 Ko
Première publication
Dernière mise à jour
Évaluations 0.00 étoile(s) 0 évaluations
Link was Broken? Please Envoyer un message à l’équipe NP et nous vous aiderons rapidement !
Soutenez le développeur Si vous êtes satisfait du test ou que votre projet vous a rapporté de l’argent, cliquez sur le bouton « Plus d’informations » pour soutenir le développeur en achetant.

Ressources similaires

[OzzModz] / [XB] Copy To Clipboard A
Adds a copy to clipboard function for your code blocks.
[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.
Haut