You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

29 lines
502 B

#!/bin/sh
. /usr/share/libubox/jshn.sh
case "$1" in
list)
json_init
json_add_object "sysupgrade"
json_close_object
json_dump
;;
call)
case "$2" in
sysupgrade)
if [ -f "/tmp/sysupgrade.bin" ]; then
/etc/init.d/uhttpd stop
/etc/init.d/dropbear stop
sleep 1;
/sbin/sysupgrade -c /tmp/sysupgrade.bin
fi
json_init
json_add_string "message" "could not find /tmp/sysupgrade.bin"
json_dump
esac
;;
esac