summaryrefslogtreecommitdiffhomepage
path: root/cli/addonsd.sh
blob: 90865d0c3698901b1066eb558e5cb561954b25cd (plain)
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
#!/sbin/sh

. /tmp/backuptool.functions

list_files() {
cat <<_EOF
xbin/wg
xbin/wg-quick
_EOF
}

case "$1" in
	backup)
		list_files | while read FILE DUMMY; do
			backup_file $S/"$FILE"
		done
	;;
	restore)
		list_files | while read FILE REPLACEMENT; do
			R=""
			[ -n "$REPLACEMENT" ] && R="$S/$REPLACEMENT"
			[ -f "$C/$S/$FILE" ] && restore_file $S/"$FILE" "$R"
		done
	;;
	pre-backup)
		# Stub
	;;
	post-backup)
		# Stub
	;;
	pre-restore)
		# Stub
	;;
	post-restore)
		# Stub
	;;
esac