mirror of
https://github.com/serghey-rodin/vesta.git
synced 2025-08-14 02:28:03 -07:00
union calls for FTP/SFTP backups
This commit is contained in:
parent
7a9c937ca1
commit
003cbbea47
5 changed files with 106 additions and 206 deletions
45
bin/v-delete-backup-host
Executable file
45
bin/v-delete-backup-host
Executable file
|
@ -0,0 +1,45 @@
|
|||
#!/bin/bash
|
||||
# info: delete backup ftp server
|
||||
# options: NONE
|
||||
#
|
||||
# The function deletes ftp backup host
|
||||
|
||||
|
||||
#----------------------------------------------------------#
|
||||
# Variable&Function #
|
||||
#----------------------------------------------------------#
|
||||
|
||||
# Includes
|
||||
source $VESTA/func/main.sh
|
||||
source $VESTA/conf/vesta.conf
|
||||
|
||||
|
||||
#----------------------------------------------------------#
|
||||
# Verifications #
|
||||
#----------------------------------------------------------#
|
||||
|
||||
|
||||
#----------------------------------------------------------#
|
||||
# Action #
|
||||
#----------------------------------------------------------#
|
||||
|
||||
# Checking network connection
|
||||
rm -f $VESTA/conf/ftp.backup.conf
|
||||
|
||||
|
||||
#----------------------------------------------------------#
|
||||
# Vesta #
|
||||
#----------------------------------------------------------#
|
||||
|
||||
# Update vesta.conf
|
||||
bckp=$(echo "$BACKUP_SYSTEM" |\
|
||||
sed "s/,/\n/g"|\
|
||||
sed "s/^ftp$//" |\
|
||||
sed "/^$/d"|\
|
||||
sed ':a;N;$!ba;s/\n/,/g')
|
||||
sed -i "s/BACKUP_SYSTEM=.*/BACKUP_SYSTEM='$bckp'/g" $VESTA/conf/vesta.conf
|
||||
|
||||
# Logging
|
||||
log_event "$OK" "$EVENT"
|
||||
|
||||
exit
|
Loading…
Add table
Add a link
Reference in a new issue