Przeglądaj źródła

Configurable $BACKUP_TEMP in v-backup-user

dpeca 7 lat temu
rodzic
commit
11eca5dfda
1 zmienionych plików z 5 dodań i 1 usunięć
  1. 5 1
      bin/v-backup-user

+ 5 - 1
bin/v-backup-user

@@ -68,8 +68,12 @@ while [ "$la" -ge "$BACKUP_LA_LIMIT" ]; do
     (( ++i))
     (( ++i))
 done
 done
 
 
+if [ -z "$BACKUP_TEMP" ]; then
+    BACKUP_TEMP=$BACKUP
+fi
+
 # Creating temporary directory
 # Creating temporary directory
-tmpdir=$(mktemp -p $BACKUP -d)
+tmpdir=$(mktemp -p $BACKUP_TEMP -d)
 
 
 if [ "$?" -ne 0 ]; then
 if [ "$?" -ne 0 ]; then
     echo "Can't create tmp dir $tmpdir" |$SENDMAIL -s "$subj" $email $notify
     echo "Can't create tmp dir $tmpdir" |$SENDMAIL -s "$subj" $email $notify