forked from homematic-community/XML-API
-
Notifications
You must be signed in to change notification settings - Fork 0
/
xml-api
executable file
·37 lines (34 loc) · 910 Bytes
/
xml-api
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#!/bin/sh
WWW_DIR=/etc/config/addons/www/xmlapi
CONFIG_URL=/addons/xmlapi/
# check for unsupported platforms
if grep -qim1 busmatic /www/api/methods/ccu/downloadFirmware.tcl; then
exit 13
fi
case "$1" in
""|start)
if [ ! -e /www/config/xmlapi ]; then
mount -o remount,rw /
ln -s $WWW_DIR /www/config/xmlapi
mount -o remount,ro /
fi
;;
info)
VER=`cat ${WWW_DIR}/VERSION`
echo "Info: <b>XML-API CCU Addon</b><br>"
echo "Info: <a href='https://github.com/homematic-community/XML-API'>https://github.com/homematic-community/XML-API</a>"
echo "Version: $(cat ${WWW_DIR}/VERSION)"
echo "Name: XML-API"
echo "Operations: uninstall"
echo "Config-Url: ${CONFIG_URL}"
echo "Update: ${CONFIG_URL}/update-check.cgi"
;;
uninstall)
if [ -e /www/config/xmlapi ]; then
mount -o remount,rw /
rm -f /www/config/xmlapi
mount -o remount,ro /
fi
rm -rf $WWW_DIR
;;
esac