mirror of
https://github.com/myvesta/vesta.git
synced 2025-01-12 14:02:54 -08:00
46 lines
1.2 KiB
Bash
Executable File
46 lines
1.2 KiB
Bash
Executable File
#!/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
|