forked from hestiacp/hestiacp
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathv-delete-backup-ftp-host
More file actions
executable file
·45 lines (32 loc) · 1.22 KB
/
v-delete-backup-ftp-host
File metadata and controls
executable file
·45 lines (32 loc) · 1.22 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#!/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