summaryrefslogtreecommitdiffhomepage
path: root/cli/install.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/install.sh
parente85142dbfc4a6e0220a83b6d4938a7a88638d823 (diff)
cli: import from contrib/examples/android
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'cli/install.sh')
-rwxr-xr-xcli/install.sh14
1 files changed, 14 insertions, 0 deletions
diff --git a/cli/install.sh b/cli/install.sh
new file mode 100755
index 00000000..f619eb6c
--- /dev/null
+++ b/cli/install.sh
@@ -0,0 +1,14 @@
+#!/bin/sh
+mount -o rw,remount /system
+
+cp -v ./addonsd.sh /system/addon.d/40-wireguard.sh
+if [ -f ./wg ]; then
+ cp -v ./wg /system/xbin/wg
+else
+ echo "Warning: this directory does not contain wg. You may have forgotten to compile it yourself?" >&2
+fi
+cp -v ./wg-quick.bash /system/xbin/wg-quick
+chmod 755 /system/xbin/wg /system/xbin/wg-quick /system/addon.d/40-wireguard.sh
+mkdir -pvm 700 /data/misc/wireguard
+
+mount -o ro,remount /system