HEX
Server: Apache/2.2.34 (Unix) mod_fastcgi/mod_fastcgi-SNAP-0910052141
System: Linux Kou-Etsu-Dou 4.4.59+ #25556 SMP PREEMPT Thu Mar 4 18:03:46 CST 2021 x86_64
User: hosam (1026)
PHP: 7.2.29
Disabled: NONE
Upload Files
File: //usr/syno/bin/user.data.collector/synouserdata_dav
#!/bin/sh

BIN_GET_KEY_VALUE="/bin/get_key_value"
CONFIG_PATH="/etc/synoinfo.conf"
CALDAV_KEY="runCalDav"

RESULT=`synoservice --status webdav-httpd-pure | grep enable`
if [ $? -eq 0 ]; then
    ENABLE_HTTP="yes"
else
    ENABLE_HTTP="no"
fi

RESULT=`synoservice --status webdav-httpd-ssl | grep enable`
if [ $? -eq 0 ]; then
    ENABLE_HTTPS="yes"
else
    ENABLE_HTTPS="no"
fi

if [ "$ENABLE_HTTP" == "yes" -o "$ENABLE_HTTPS" == "yes" ]; then
    ENABLE_WEBDAV="yes"
else
    ENABLE_WEBDAV="no"
fi

ENABLE_CALDAV=`$BIN_GET_KEY_VALUE $CONFIG_PATH $CALDAV_KEY`

echo -n "{"

echo -n \"webdav_enable\":\"$ENABLE_WEBDAV\",
echo -n \"webdav_http_enable\":\"$ENABLE_HTTP\",
echo -n \"webdav_https_enable\":\"$ENABLE_HTTPS\",
echo -n \"caldav_enable\":\"$ENABLE_CALDAV\",

# let version be the last one msg
echo -n \"collector_version\":1

echo "}"