18 lines
409 B
Plaintext
18 lines
409 B
Plaintext
|
VERSION=1
|
||
|
|
||
|
[ "$(uci -q get defaults.version.dropbear)" -ge "$VERSION" ] && exit 0
|
||
|
|
||
|
# save version
|
||
|
/sbin/uci set defaults.version.dropbear="$VERSION"
|
||
|
|
||
|
/sbin/uci -q batch << EOF
|
||
|
set defaults.version.dropbear="$VERSION"
|
||
|
commit defaults
|
||
|
set dropbear.@dropbear[0].PasswordAuth='off'
|
||
|
set dropbear.@dropbear[0].RootPasswordAuth='off'
|
||
|
commit dropbear
|
||
|
EOF
|
||
|
|
||
|
/sbin/service dropbear enable
|
||
|
/sbin/service dropbear restart
|