aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/contrib/examples/android/install.sh
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/examples/android/install.sh')
-rwxr-xr-xcontrib/examples/android/install.sh14
1 files changed, 14 insertions, 0 deletions
diff --git a/contrib/examples/android/install.sh b/contrib/examples/android/install.sh
new file mode 100755
index 0000000..f619eb6
--- /dev/null
+++ b/contrib/examples/android/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