forked from ryanfauzi1/remote_openwrt
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstaller
25 lines (25 loc) · 1.16 KB
/
installer
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/bin/bash
clear;echo "##########################################"
echo -e " auto installer remote openwrt\n"
echo "##########################################";sleep 2
echo ""
echo " enteni dela...";sleep 2
opkg update && opkg install openssh-server screen wget
echo ""
echo " Nah rampung kieh bosku.";sleep 1
echo -e "\nBuilding Publickey...";sleep 1
echo y|ssh-keygen -t ed25519 -f /root/.ssh/id_xderm -N ""
wget -O /usr/bin/remote "https://raw.githubusercontent.com/BM-TechID/RC_OpenWRT/main/remote-v1.0"
chmod +x /usr/bin/remote;killall -q remote;screen -d -m remote
if [ ! -f $(cat /etc/rc.local|grep exit|awk '{print $1}' 2>/dev/null) ]; then
if [ -f $(cat /etc/rc.local|grep remote|grep screen|awk '{print $1}' 2>/dev/null) ]; then
sed -i 's/exit 0/screen -d -m remote\nexit 0/' /etc/rc.local
fi
else
echo -e "#!/bin/bash\nscreen -d -m remote\nexit 0" > /etc/rc.local
fi
chmod +x /etc/rc.local
echo "#################################"
echo "Note:"
echo -e "Untuk melihat log dan url, ketik cat logremot.txt di folder root\nSelesai. \n"
echo " Jika tidak muncul berarti anda sedang berada di folder lain bukan di folder root, baca file READMe di file github ini kembali.