From ad06f51589f97fda5d2e7f83e430208c838862a8 Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Mon, 31 Jul 2017 03:02:26 +0200 Subject: cli: import from contrib/examples/android --- cli/addonsd.sh | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 cli/addonsd.sh (limited to 'cli/addonsd.sh') diff --git a/cli/addonsd.sh b/cli/addonsd.sh new file mode 100644 index 00000000..90865d0c --- /dev/null +++ b/cli/addonsd.sh @@ -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 -- cgit v1.2.3