mirror of
https://github.com/brunofontes/linuxShortcuts.git
synced 2024-11-23 23:40:51 +00:00
Backup does not start on metered connections anymore
This commit is contained in:
parent
7a28fde055
commit
2b36d7c555
1
Services/backup-contabo.env
Normal file
1
Services/backup-contabo.env
Normal file
@ -0,0 +1 @@
|
||||
CONTABO_BACKUP_PATH="/home/bruno/Backups/Contabo"
|
1
Services/backup-contabo.service
Executable file → Normal file
1
Services/backup-contabo.service
Executable file → Normal file
@ -3,3 +3,4 @@ Description=Backup contabo daily
|
||||
|
||||
[Service]
|
||||
ExecStart=/home/bruno/Backups/Contabo/backup-contabo.sh
|
||||
EnvironmentFile=/home/bruno/Apps/linuxShortcuts/Services/backup-contabo.env
|
||||
|
@ -1,4 +1,10 @@
|
||||
#! /bin/bash
|
||||
|
||||
if [[ `nmcli -t -f GENERAL.METERED dev show | grep "METERED:yes"` ]]; then
|
||||
echo Backup does not work on metered connections
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ -z $CONTABO_BACKUP_PATH ]]; then
|
||||
echo CONTABO_BACKUP_PATH environment not set
|
||||
exit 1
|
||||
|
Loading…
Reference in New Issue
Block a user