. /usr/syno/bin/jsoncmd

BACKUP_CONF_DIR="/var/packages/OAuthService/target/etc"

exportPath=$(jget "${SYNOPKG_BKP_INPUT}" ".temp_path")
if [ $? -ne 0 ];then
        jerr "bad parameters"
        exit 1
fi

if [ -d "$BACKUP_CONF_DIR" ]; then
    /bin/cp -f $BACKUP_CONF_DIR/oauth.db $exportPath
fi

jout_begin
joutstr "app_data_version" "1.0"
jout_end

exit 0

