cli: import from contrib/examples/android

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
This commit is contained in:
Jason A. Donenfeld
2017-07-31 03:02:26 +02:00
committed by Samuel Holland
parent e85142dbfc
commit df4fc98493
4 changed files with 259 additions and 0 deletions
Executable
+14
View File
@@ -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