Adapt lang_patch.sh for newest routers

This commit is contained in:
remittor
2022-09-17 16:47:04 +03:00
parent e74eb9569c
commit af9bd42e0b
4 changed files with 100 additions and 42 deletions
+8 -6
View File
@@ -1,19 +1,21 @@
#!/bin/sh
DIR_PATCH=/etc/crontabs/patches
if [ "$( grep 'ssh_patch.sh' /etc/crontabs/root )" != "" ]; then
if [ -e "/tmp/ssh_uninstall.sh" ]; then
sh /tmp/ssh_uninstall.sh
fi
fi
if [ ! -d /etc/crontabs/patches/ ]; then
mkdir /etc/crontabs/patches/
chown root /etc/crontabs/patches/
chmod 0755 /etc/crontabs/patches/
if [ ! -d $DIR_PATCH ]; then
mkdir $DIR_PATCH
chown root $DIR_PATCH
chmod 0755 $DIR_PATCH
fi
mv -f /tmp/ssh_patch.sh /etc/crontabs/patches/
chmod +x /etc/crontabs/patches/ssh_patch.sh
mv -f /tmp/ssh_patch.sh $DIR_PATCH/
chmod +x $DIR_PATCH/ssh_patch.sh
nvram set ssh_en=1
nvram commit