Revert "due to renaming .rpcd was forgotten in the Makefile"
[feed/packages.git] / utils / rpcd-mod-attendedsysupgrade / files / attendedsysupgrade.rpcd
1 #!/bin/sh
2
3 . /usr/share/libubox/jshn.sh
4
5 case "$1" in
6 list)
7 json_init
8
9 json_add_object "sysupgrade"
10 json_close_object
11
12 json_dump
13 ;;
14 call)
15 case "$2" in
16 sysupgrade)
17 if [ -f "/tmp/sysupgrade.bin" ]; then
18 /etc/init.d/uhttpd stop
19 /etc/init.d/dropbear stop
20 sleep 1;
21 /sbin/sysupgrade -c /tmp/sysupgrade.bin
22 fi
23 json_init
24 json_add_string "message" "could not find /tmp/sysupgrade.bin"
25 json_dump
26 esac
27 ;;
28 esac
29