diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2017-07-31 03:02:26 +0200 |
---|---|---|
committer | Samuel Holland <samuel@sholland.org> | 2017-07-31 03:02:26 +0200 |
commit | df4fc984934e074725ca9aa003cfc73be67dc756 (patch) | |
tree | f43de4a3a219c9805cd91ec743b8f395cbbae25c /cli/addonsd.sh | |
parent | e85142dbfc4a6e0220a83b6d4938a7a88638d823 (diff) |
cli: import from contrib/examples/android
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'cli/addonsd.sh')
-rw-r--r-- | cli/addonsd.sh | 37 |
1 files changed, 37 insertions, 0 deletions
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 |