| 123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- #!/bin/bash
- # info: delete backup ftp server
- # options: NONE
- #
- # The function deletes ftp backup host
- #----------------------------------------------------------#
- # Variable&Function #
- #----------------------------------------------------------#
- # Includes
- source $VESTA/conf/vesta.conf
- source $VESTA/func/main.sh
- #----------------------------------------------------------#
- # Verifications #
- #----------------------------------------------------------#
- #----------------------------------------------------------#
- # Action #
- #----------------------------------------------------------#
- # Checking network connection
- rm -f $VESTA/conf/ftp.backup.conf
- #----------------------------------------------------------#
- # Vesta #
- #----------------------------------------------------------#
- # Update vesta.conf
- bckp=$(echo "$BACKUP_SYSTEM" |\
- sed -e "s/,/\n/g"|\
- sed -e "s/ftp//" |\
- sed -e "/^$/d"|\
- sed -e ':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
|