evobackup: log/pid files named after program's name

This commit is contained in:
Jérémy Lecour 2021-02-08 11:32:12 +01:00 committed by Jérémy Lecour
parent 53a1309d69
commit 68a7da6b88
1 changed files with 6 additions and 5 deletions

View File

@ -32,17 +32,18 @@ SERVERS_FALLBACK=${SERVERS_FALLBACK:-1}
# timeout (in seconds) for SSH connections # timeout (in seconds) for SSH connections
SSH_CONNECT_TIMEOUT=${SSH_CONNECT_TIMEOUT:-90} SSH_CONNECT_TIMEOUT=${SSH_CONNECT_TIMEOUT:-90}
## We use /home/backup : feel free to use your own dir # We use /home/backup : feel free to use your own dir
LOCAL_BACKUP_DIR="/home/backup" LOCAL_BACKUP_DIR="/home/backup"
# You can set "linux" or "bsd" manually or let it choose automatically # You can set "linux" or "bsd" manually or let it choose automatically
SYSTEM=$(uname | tr '[:upper:]' '[:lower:]') SYSTEM=$(uname | tr '[:upper:]' '[:lower:]')
# Change these 2 variables if you have more than one backup cron # Store pid and logs in a file named after this program's name
PIDFILE="/var/run/evobackup.pid" PROGNAME=$(basename $0)
LOGFILE="/var/log/evobackup.log" PIDFILE="/var/run/${PROGNAME}.pid"
LOGFILE="/var/log/${PROGNAME}.log"
## Enable/Disable tasks # Enable/Disable tasks
LOCAL_TASKS=${LOCAL_TASKS:-1} LOCAL_TASKS=${LOCAL_TASKS:-1}
SYNC_TASKS=${SYNC_TASKS:-1} SYNC_TASKS=${SYNC_TASKS:-1}