2023-02-06 13:29:00 +01:00
|
|
|
|
#!/bin/bash
|
2023-02-17 12:27:17 +01:00
|
|
|
|
# ajouter dans les scripts avec cette ligne:
|
|
|
|
|
#
|
2023-10-15 21:35:33 +02:00
|
|
|
|
# source ~/Nextcloud/ressources/workflow_nextcloud/public_workflow/workflow_variables.sh
|
2023-02-17 12:27:17 +01:00
|
|
|
|
#
|
|
|
|
|
#
|
2023-02-20 16:55:34 +01:00
|
|
|
|
export main_user="tykayn"
|
2023-02-22 15:52:26 +01:00
|
|
|
|
|
|
|
|
|
export main_archive_source_ssh_lan="tykayn@192.168.1.14"
|
|
|
|
|
export backup_laptop_archive_path="/home/poule/backup/encrypted"
|
|
|
|
|
|
|
|
|
|
|
2023-02-17 12:27:17 +01:00
|
|
|
|
export WORKFLOW_PATH=~/Nextcloud/ressources/workflow_nextcloud
|
2023-02-20 16:55:34 +01:00
|
|
|
|
export WORKFLOW_PATH_ROOT=/home/$main_user/Nextcloud/ressources/workflow_nextcloud
|
2023-02-17 12:27:17 +01:00
|
|
|
|
export ALIASES_PATH=$WORKFLOW_PATH/install/.bash_custom_aliases
|
|
|
|
|
# fichiers orgmode, wiki personnel
|
2023-02-06 13:29:00 +01:00
|
|
|
|
export orgmode_path=~/Nextcloud/textes/orgmode
|
2023-02-17 12:27:17 +01:00
|
|
|
|
export inbox_orgmode=$orgmode_path/incoming_inbox.org
|
2023-02-06 13:29:00 +01:00
|
|
|
|
export orgroam_path=~/Nextcloud/textes/orgmode/org-roam
|
2023-02-17 12:27:17 +01:00
|
|
|
|
export backup_texts_folder=~/archives/backup_automatique
|
|
|
|
|
export HOME_OF_SCRIPTS=$www_folder/scripts
|
|
|
|
|
|
|
|
|
|
# archives dans un pool zfs nommé poule
|
|
|
|
|
export stockage_syncable_folder=/home/poule/encrypted/stockage-syncable
|
|
|
|
|
|
|
|
|
|
# dossier où stocker les projets de dev
|
2023-07-17 22:19:25 +02:00
|
|
|
|
export www_folder=$stockage_syncable_folder/www/development/html/
|
2023-02-17 12:27:17 +01:00
|
|
|
|
|
2023-10-15 21:35:33 +02:00
|
|
|
|
export node_version_expected="stable"
|
2023-02-17 12:27:17 +01:00
|
|
|
|
|
|
|
|
|
export today=`date` # to log current time
|
|
|
|
|
export ARCHIVE_SYNCABLE=$stockage_syncable_folder # place where we have our things sorted, other than home
|
|
|
|
|
export BORG_PASSCOMMAND="cat $ARCHIVE_SYNCABLE/.tk-borg-passphrase-light" # get the borg repo pass
|
2023-07-17 22:19:25 +02:00
|
|
|
|
|
|
|
|
|
export a_dispatcher="$ARCHIVE_SYNCABLE/photos/a_dispatcher" # dossier où sont stockées les photos en provenance du smartphone
|
|
|
|
|
export PHOTOS_TO_DISPATCH="$a_dispatcher"
|
|
|
|
|
export PHOTOS_FOLDER="$ARCHIVE_SYNCABLE/photos/"
|
|
|
|
|
|
2023-10-15 21:35:33 +02:00
|
|
|
|
export SPACESHIP_BORG_REPO="/home/poule/borg_archives/borg2"
|
2023-07-17 22:19:25 +02:00
|
|
|
|
export SPACESHIP_NEW_BORG_REPO="/home/poule/borg_archives/borg2"
|
|
|
|
|
export BORG_REPO=$SPACESHIP_NEW_BORG_REPO
|
|
|
|
|
|
2023-02-17 12:27:17 +01:00
|
|
|
|
export LOG_FILE_BACKUP="$ARCHIVE_SYNCABLE/www/backup/log_backup.log"
|
|
|
|
|
# log dates of execution of the script
|
2023-02-22 15:52:26 +01:00
|
|
|
|
export LOG_FILE_BACKUP_DATES="$ARCHIVE_SYNCABLE/www/backup/summary_log_backup.log"
|
|
|
|
|
|
|
|
|
|
export main_archive_source_sftop_spaceship="/mnt/spaceship_poule"
|
2023-07-17 22:19:25 +02:00
|
|
|
|
export IP_DU_NAS="192.168.1.15"
|
|
|
|
|
export MOUNT_FOLDER_DU_NAS="/mnt/spaceship_poule"
|
2023-02-22 15:52:26 +01:00
|
|
|
|
|
2023-02-27 09:48:52 +01:00
|
|
|
|
export CURRENT_YEAR=$(date +%Y)
|
|
|
|
|
|
2023-02-22 15:52:26 +01:00
|
|
|
|
# add custom workflow scripts
|
2023-07-17 22:19:25 +02:00
|
|
|
|
export PATH=$WORKFLOW_PATH:$PATH
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
########## colors for logging #########
|
|
|
|
|
# https://wiki.archlinux.org/title/Bash/Prompt_customization#List_of_colors_for_prompt_and_Bash
|
|
|
|
|
#
|
|
|
|
|
# echo -e "${txtred}asd${txtwht}"
|
|
|
|
|
#
|
|
|
|
|
#######################################
|
|
|
|
|
|
|
|
|
|
export txtblk='\e[0;30m' # Black - Regular
|
|
|
|
|
export txtred='\e[0;31m' # Red
|
|
|
|
|
export txtgrn='\e[0;32m' # Green
|
|
|
|
|
export txtylw='\e[0;33m' # Yellow
|
|
|
|
|
export txtblu='\e[0;34m' # Blue
|
|
|
|
|
export txtpur='\e[0;35m' # Purple
|
|
|
|
|
export txtcyn='\e[0;36m' # Cyan
|
|
|
|
|
export txtwht='\e[0;37m' # White
|
|
|
|
|
export txtbold='\e[1m' # bold
|
|
|
|
|
export txtreset='\e(B\e[m' # back to normal
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# --------- gestion des exclusions de rsync -------- #
|
|
|
|
|
EXCLUDE=( ".yarn" ".nvm" "cache" ".cache" "Cache" "Steam" "steamapps" ".npm" ".yarn" "node_modules" ".mozilla" "vendor" "Steam" ".rbenv" ".config/borg" "@eaDir" "steamapps" "bower_components" ".cargo" ".gem" ".BOINC")
|
|
|
|
|
exclude_opts=()
|
|
|
|
|
for item in "${EXCLUDE[@]}"; do
|
|
|
|
|
exclude_opts+=( --exclude "$item" )
|
|
|
|
|
done
|
|
|
|
|
|
|
|
|
|
export exclude_opts
|