summaryrefslogtreecommitdiffhomepage
path: root/cli/addonsd.sh
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2017-07-31 03:02:26 +0200
committerSamuel Holland <samuel@sholland.org>2017-07-31 03:02:26 +0200
commitdf4fc984934e074725ca9aa003cfc73be67dc756 (patch)
treef43de4a3a219c9805cd91ec743b8f395cbbae25c /cli/addonsd.sh
parente85142dbfc4a6e0220a83b6d4938a7a88638d823 (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.sh37
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