mirror of
https://github.com/openwrt-xiaomi/xmir-patcher.git
synced 2026-09-22 22:57:55 +03:00
Add new menu "Install permanent SSH"
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
#!/bin/sh
|
||||
|
||||
if [ "$( grep 'ssh_patch.sh' /etc/crontabs/root )" != "" ]; then
|
||||
sh /tmp/ssh_uninstall.sh
|
||||
fi
|
||||
|
||||
mv -f /tmp/ssh_patch.sh /etc/crontabs/
|
||||
chmod +x /etc/crontabs/ssh_patch.sh
|
||||
|
||||
nvram set ssh_en=1
|
||||
nvram commit
|
||||
|
||||
grep -v "/etc/crontabs/ssh_patch.sh" /etc/crontabs/root > /etc/crontabs/root.new;
|
||||
echo "*/1 * * * * /etc/crontabs/ssh_patch.sh >/dev/null 2>&1" >> /etc/crontabs/root.new
|
||||
mv /etc/crontabs/root.new /etc/crontabs/root
|
||||
/etc/init.d/cron restart
|
||||
Reference in New Issue
Block a user