cli: import from contrib/examples/android
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
This commit is contained in:
committed by
Samuel Holland
parent
e85142dbfc
commit
df4fc98493
@@ -0,0 +1,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
|
||||
Reference in New Issue
Block a user