Просмотр исходного кода

Merge pull request #8 from serghey-rodin/master

update from master
myvesta 7 лет назад
Родитель
Сommit
6c2f4e34a4
2 измененных файлов с 10 добавлено и 2 удалено
  1. 5 1
      bin/v-backup-user
  2. 5 1
      bin/v-restore-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

+ 5 - 1
bin/v-restore-user

@@ -229,8 +229,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
     sed -i "/ $user /d" $VESTA/data/queue/backup.pipe
     sed -i "/ $user /d" $VESTA/data/queue/backup.pipe