├── PKGVERSION ├── conf ├── PKG_DEPS ├── privilege └── resource ├── helper ├── lock-permissions.sh └── serial-enable.sh ├── scripts ├── preinst ├── preuninst ├── postuninst ├── common-vars.sh ├── postupgrade ├── karaf-service.sh ├── preupgrade ├── postinst └── start-stop-status ├── .github └── FUNDING.yml ├── PACKAGE_ICON.PNG ├── ui ├── images │ ├── PACKAGE_ICON.PNG │ ├── PACKAGE_ICON_16.PNG │ ├── PACKAGE_ICON_24.PNG │ ├── PACKAGE_ICON_32.PNG │ ├── PACKAGE_ICON_48.PNG │ ├── PACKAGE_ICON_64.PNG │ ├── PACKAGE_ICON_72.PNG │ └── PACKAGE_ICON_256.png ├── texts │ ├── enu │ │ └── strings │ └── ger │ │ └── strings ├── config └── oh2manager.js ├── .gitignore ├── NOTICE ├── INFO.in ├── .travis.yml ├── WIZARD_UIFILES ├── install_uifile ├── install_uifile.sh ├── upgrade_uifile └── upgrade_uifile.sh ├── README.md ├── CONTRIBUTING.md └── LICENSE /PKGVERSION: -------------------------------------------------------------------------------- 1 | 0.1 2 | -------------------------------------------------------------------------------- /conf/PKG_DEPS: -------------------------------------------------------------------------------- 1 | pkg_min_ver=4.0 2 | -------------------------------------------------------------------------------- /helper/lock-permissions.sh: -------------------------------------------------------------------------------- 1 | chmod a+w,+t /var/lock -------------------------------------------------------------------------------- /scripts/preinst: -------------------------------------------------------------------------------- 1 | #!/bin/bash -eux 2 | 3 | exit 0 4 | -------------------------------------------------------------------------------- /scripts/preuninst: -------------------------------------------------------------------------------- 1 | #!/bin/bash -eux 2 | 3 | exit 0 4 | -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | custom: ['https://www.buymeacoffee.com/4strHTc'] 2 | -------------------------------------------------------------------------------- /PACKAGE_ICON.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openhab/openhab-syno-spk/HEAD/PACKAGE_ICON.PNG -------------------------------------------------------------------------------- /ui/images/PACKAGE_ICON.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openhab/openhab-syno-spk/HEAD/ui/images/PACKAGE_ICON.PNG -------------------------------------------------------------------------------- /ui/images/PACKAGE_ICON_16.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openhab/openhab-syno-spk/HEAD/ui/images/PACKAGE_ICON_16.PNG -------------------------------------------------------------------------------- /ui/images/PACKAGE_ICON_24.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openhab/openhab-syno-spk/HEAD/ui/images/PACKAGE_ICON_24.PNG -------------------------------------------------------------------------------- /ui/images/PACKAGE_ICON_32.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openhab/openhab-syno-spk/HEAD/ui/images/PACKAGE_ICON_32.PNG -------------------------------------------------------------------------------- /ui/images/PACKAGE_ICON_48.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openhab/openhab-syno-spk/HEAD/ui/images/PACKAGE_ICON_48.PNG -------------------------------------------------------------------------------- /ui/images/PACKAGE_ICON_64.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openhab/openhab-syno-spk/HEAD/ui/images/PACKAGE_ICON_64.PNG -------------------------------------------------------------------------------- /ui/images/PACKAGE_ICON_72.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openhab/openhab-syno-spk/HEAD/ui/images/PACKAGE_ICON_72.PNG -------------------------------------------------------------------------------- /ui/images/PACKAGE_ICON_256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openhab/openhab-syno-spk/HEAD/ui/images/PACKAGE_ICON_256.png -------------------------------------------------------------------------------- /conf/privilege: -------------------------------------------------------------------------------- 1 | { 2 | "defaults": { 3 | "run-as": "package" 4 | }, 5 | "username": "openHAB", 6 | "groupname": "openHAB" 7 | } 8 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # IDEs 2 | .project 3 | 4 | # Generated files 5 | package.tgz 6 | 7 | # SPK files 8 | openHAB-*.spk 9 | 10 | # build directory 11 | build 12 | 13 | # download directory 14 | dl 15 | -------------------------------------------------------------------------------- /scripts/postuninst: -------------------------------------------------------------------------------- 1 | #!/bin/bash -eux 2 | 3 | ########################### 4 | # Wipe all data in PKGVAR # 5 | ########################### 6 | 7 | [[ ! -n "${SYNOPKG_PKGVAR}" ]] && [[ -d "${SYNOPKG_PKGVAR}" ]] && rm -rf ${SYNOPKG_PKGVAR}/* 8 | 9 | exit 0 10 | -------------------------------------------------------------------------------- /conf/resource: -------------------------------------------------------------------------------- 1 | { 2 | "data-share": { 3 | "shares": [ 4 | { 5 | "name": "openHAB", 6 | "permission": { 7 | "rw": ["openHAB"] 8 | } 9 | } 10 | ] 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /helper/serial-enable.sh: -------------------------------------------------------------------------------- 1 | /sbin/modprobe --dry-run --first-time usbserial && /sbin/modprobe usbserial 2 | /sbin/modprobe --dry-run --first-time ftdi_sio && /sbin/modprobe ftdi_sio 3 | /sbin/modprobe --dry-run --first-time cdc-acm && /sbin/modprobe cdc-acm 4 | 5 | chmod a+rw /dev/ttyACM* 6 | -------------------------------------------------------------------------------- /scripts/common-vars.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -eux 2 | 3 | # shares 4 | SHARE_OPENHAB=/var/packages/${SYNOPKG_PKGNAME}/shares/${SYNOPKG_PKGNAME} 5 | SHARE_OPENHAB_BACKUP=${SHARE_OPENHAB}/backup 6 | 7 | # other shortcuts 8 | PKGDEST_OPENHAB=${SYNOPKG_PKGDEST}/openHAB 9 | SYNOPKG_PKGDEST_OPENHAB_ENV="${SYNOPKG_PKGDEST}/${SYNOPKG_PKGNAME}.env" 10 | -------------------------------------------------------------------------------- /NOTICE: -------------------------------------------------------------------------------- 1 | This content is produced and maintained by the openHAB project. 2 | 3 | * Project home: https://www.openhab.org 4 | 5 | == Declared Project Licenses 6 | 7 | This program and the accompanying materials are made available under the terms 8 | of the Eclipse Public License 2.0 which is available at 9 | https://www.eclipse.org/legal/epl-2.0/. 10 | 11 | == Source Code 12 | 13 | https://github.com/openhab/openhab-syno-spk 14 | -------------------------------------------------------------------------------- /scripts/postupgrade: -------------------------------------------------------------------------------- 1 | #!/bin/bash -eux 2 | 3 | source `dirname $0`/common-vars.sh 4 | 5 | #################################### 6 | # ./userdata: Recover if available # 7 | #################################### 8 | 9 | [[ -d "${SYNOPKG_PKGVAR}/backup/userdata" ]] && cp -rf "${SYNOPKG_PKGVAR}/backup/userdata" "${PKGDEST_OPENHAB}" 10 | 11 | [[ -d "${SYNOPKG_PKGVAR}/backup" ]] && rm -rf "${SYNOPKG_PKGVAR}/backup" 12 | 13 | exit 0 14 | -------------------------------------------------------------------------------- /scripts/karaf-service.sh: -------------------------------------------------------------------------------- 1 | # 2 | # Java 3 | # 4 | JAVA_HOME="${SYNOPKG_PKGDEST}/OpenJDK_$(uname -m)" 5 | 6 | # 7 | # Karaf 8 | # 9 | 10 | # 11 | # Karaf Service 12 | # 13 | KARAF_SERVICE_NAME="${SYNOPKG_PKGNAME}" 14 | 15 | KARAF_SERVICE_USER="${SYNOPKG_PKGNAME}" 16 | KARAF_SERVICE_GROUP="${SYNOPKG_PKGNAME}" 17 | 18 | KARAF_SERVICE_PATH="${SYNOPKG_PKGDEST}/$KARAF_SERVICE_NAME/runtime" 19 | KARAF_SERVICE_LOG="${SYNOPKG_PKGDEST}/${SYNOPKG_PKGNAME}.log" 20 | KARAF_SERVICE_PIDFILE="${SYNOPKG_PKGDEST}/${SYNOPKG_PKGNAME}.pid" 21 | 22 | KARAF_SERVICE_EXECUTABLE="karaf" 23 | 24 | KARAF_NOROOT="true" 25 | 26 | # 27 | # User 28 | # 29 | -------------------------------------------------------------------------------- /ui/texts/enu/strings: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2000-2015 Synology Inc. All rights reserved. 2 | 3 | [app] 4 | app_name = "openHAB" 5 | description = "Tool for openHAB integration" 6 | str_meta_desc = "The open Home Automation Bus (openHAB) is an open source, technology agnostic home automation platform which runs as the center of your smart home!" 7 | 8 | [common] 9 | description = "The open Home Automation Bus (openHAB) is an open source, technology agnostic home automation platform which runs as the center of your smart home!" 10 | 11 | [config] 12 | fieldset_test = "Coming soon" 13 | 14 | [errors] 15 | directsubmit = "Saving failed" 16 | 17 | [ui] 18 | test = "Coming soon" 19 | -------------------------------------------------------------------------------- /ui/config: -------------------------------------------------------------------------------- 1 | { 2 | "oh2manager.js": { 3 | "SYNO.SDS.OH2.Instance": { 4 | "type": "app", 5 | "title": "app:app_name", 6 | "desc":"app:description", 7 | "icon":"images/PACKAGE_ICON_{0}.PNG", 8 | "version":"1.0", 9 | "texts": "texts", 10 | "allowMultiInstance": false, 11 | "appWindow": "SYNO.SDS.OH2.MainWindow", 12 | "depend": ["SYNO.SDS.OH2.MainWindow"] 13 | }, 14 | "SYNO.SDS.OH2.MainWindow": { 15 | "type": "lib", 16 | "title": "app:app_name", 17 | "icon":"images/PACKAGE_ICON_{0}.PNG", 18 | "texts": "texts", 19 | "depend": [] 20 | } 21 | } 22 | } -------------------------------------------------------------------------------- /ui/texts/ger/strings: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2000-2015 Synology Inc. All rights reserved. 2 | 3 | [app] 4 | app_name = "openHAB" 5 | description = "Hilfsanwendung für die openHAB Integration" 6 | str_meta_desc = "Open Home Automation Bus (openHAB) ist eine Open Source Agnostic Home Automation Plattform Technologie, die als Zentrum Ihres smart home läuft!" 7 | 8 | [common] 9 | description = "Open Home Automation Bus (openHAB) ist eine Open Source Agnostic Home Automation Plattform Technologie, die als Zentrum Ihres smart home läuft!" 10 | 11 | [config] 12 | fieldset_test = "Kommt demnächst" 13 | 14 | [errors] 15 | directsubmit = "Speicher fehlgeschlagen" 16 | 17 | [ui] 18 | test = "Kommt demnächst" 19 | 20 | -------------------------------------------------------------------------------- /INFO.in: -------------------------------------------------------------------------------- 1 | package="openHAB" 2 | description="The open Home Automation Bus (openHAB) project aims at providing a universal integration platform for all things around home automation. During the installation you can choose a shared folder for configuration, addons and userdata." 3 | changelog="" 4 | version="#PACKAGE_VERSION#" 5 | arch="noarch" 6 | os_min_ver="7.0-40356" 7 | 8 | # Maintainer and distributor(s) 9 | maintainer="openHAB.org" 10 | maintainer_url="http://openhab.org/" 11 | distributor="cniweb, thopiekar, et al" 12 | distributor_url="https://github.com/openhab/openhab-syno-spk" 13 | 14 | #dsmuidir="ui" 15 | #dsmappname="SYNO.SDS.OH2.Instance" 16 | 17 | helpurl="https://community.openhab.org/" 18 | package_icon="PACKAGE_ICON.PNG" 19 | 20 | precheckstartstop=yes 21 | startable="yes" 22 | -------------------------------------------------------------------------------- /scripts/preupgrade: -------------------------------------------------------------------------------- 1 | #!/bin/bash -eux 2 | 3 | source `dirname $0`/common-vars.sh 4 | 5 | ################################# 6 | # # 7 | # Backup from PKGDEST to PKGVAR # 8 | # # 9 | ################################# 10 | 11 | ###################### 12 | # ./userdata: Backup # 13 | ###################### 14 | 15 | [[ ! -z "${SYNOPKG_PKGVAR}" ]] && [[ ! -d "${SYNOPKG_PKGVAR}/backup" ]] && mkdir -p "${SYNOPKG_PKGVAR}/backup" 16 | [[ -d "${PKGDEST_OPENHAB}/userdata" ]] && cp -rf "${PKGDEST_OPENHAB}/userdata" "${SYNOPKG_PKGVAR}/backup" 17 | 18 | ###################################### 19 | # ./userdata: Remove pointless stuff # 20 | ###################################### 21 | 22 | rm -rf "${SYNOPKG_PKGVAR}/backup/userdata/etc" 23 | rm -rf "${SYNOPKG_PKGVAR}/backup/userdata/tmp" 24 | 25 | ########################### 26 | # .: Making a full backup # 27 | ########################### 28 | # TODO: Doing it only on request. E.g. if user checks a box in the package settings. 29 | 30 | SHARE_OPENHAB_BACKUP_WITH_TIMESTAMP=${SHARE_OPENHAB_BACKUP}/$(date +"%Y%m%d_%H%M%S_%3N") 31 | [[ ! -z "${SYNOPKG_PKGNAME}" ]] && [[ ! -d "${SHARE_OPENHAB_BACKUP_WITH_TIMESTAMP}" ]] && mkdir -p "${SHARE_OPENHAB_BACKUP_WITH_TIMESTAMP}" 32 | [[ ! -z "${PKGDEST_OPENHAB}" ]] && cp -rfL "${PKGDEST_OPENHAB}" "${SHARE_OPENHAB_BACKUP_WITH_TIMESTAMP}" 33 | 34 | exit 0 35 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: shell 2 | os: linux 3 | dist: trusty 4 | script: 5 | - ./build.sh 6 | deploy: 7 | skip_cleanup: true 8 | provider: releases 9 | api_key: 10 | secure: PJMqKnfITCeWIw6AneWqrGZD2P9vKuUZvndQYrNIJQqoZW8e+nJxUy4c0YUxnCnL3YNcJP+U8DVBI3UzmCZhN8PO4n7Pdq5MacNVJT0XLtOQ93D7HR8UJqsAWQd0I5PwGubCx6ZgkobrlE64Wo4qyiZ8BkCIEu/FE+NYFaHyhQMPLMtUScf1nADDyGu+kamxPcg6LLDDVhxLR8SUbj0f1IzeuR9kthq38LD6qOtr4Tr6LPNyttnoXHgyIuPjGkYARwXhr5qRG+d74hf7uhQNplIYe/obtKfYWdcknP9e1B4/ZgUfVWZ2pWfTBHkwnVoIqquJwI6JijxM4BUEwwKMOP2/LlSauqHqYOqu6D+On1cPrqoUtoTLEoBN7C3Mnkq980GxUEwXdzPU0OpLVGIHr20gKe2LwDLmZCydPO+I+PPOMxKwqVy05lDHb5lEytQFEeOL5cF+2BVX6Y612iqPWqvqdQIVEVvuLGQk5lDtAnvyWkFZ830CU0tyUkqVO/X7DIFo6BdCccWN7Qo5xaZZ69BaOxWHLftPCj2VBRyqWoiLHRZLBaGjEzgLa811aMprIA/rtxBn/DM1XurK6PB078/d0YDvbnraxxK0g2y9ZiL659OO8F81DhTD1Vc366IR1YQWjI0mW9M6+mzJKGlrRvXzDSqNd69FnyHxN4B6+2Q= 11 | file: openHAB-$OPENHAB_VERSION-syno-noarch-0.001.spk 12 | on: 13 | tags: true 14 | repo: openhab/openhab-syno-spk 15 | notifications: 16 | email: 17 | - c-n-i@web.de 18 | webhooks: 19 | urls: 20 | - https://webhooks.gitter.im/e/ad63d38810d8674398c4 21 | on_success: change 22 | on_failure: always 23 | on_start: never 24 | env: 25 | global: 26 | - OPENHAB_VERSION=3.2.0 27 | - secure: aoHb/LMCDQNUV+WUZmYrldu9NkT6MocYqfu+oLkNYGswQjraagAGkwH26U83WRk87wH4zJCfTqPwPBxXA/BWBCilf/UnK9vYDPuRU4Zz89cwnLTfS+KJ/yakOXTKS08Ak8+srqGBzh+T12iAJ8/Sm6CvxLvPr8YdeSQ7sF5UzkOT9few5re4iR+noBQCG8ShVX272asEJglUGQoU+hNzbbmETqOqBpbOJY+I+uJERbBUHgBZJdgMLeJCzrhfPfS/lJUuYe429rToL0k1jT8reDFFcUrLenRN+whyIniIl7NnBzOOOrKXy1QG2XY1Jt4rT7kXuZ/Zhs+QPnbxdsVebeeYCWuU5oR8zp3FNjZ7w3pjiG0Z8gAlVtDr32q5AxMxlf0ualfp71Q1T9T2cEMajNILZm6G8HmhdIGXos8JhQMEZclvOhJ8xeOxRMHEBV/5/QoCJ/LA4fKagQKJGzYLK+QGiIJ0PoDgGwHii7F5Cibq5dRHooJKU3dDgr6rNXrLrVpQdTbwBmarTOl4w4CMCm55/VDPnA/8Wbi52dd12sccTAJru7JIGDm59xgN+f79q1mTYKcC/v3kaY8tm+ntYi5jIoDgSoxWHznK/DdUHvMrsAuFb3bEfVYkrgHr2A12L3Mk+m9JsClo0lDc4QXynlExqOjdxgdkmEoevbPNeeA= 28 | -------------------------------------------------------------------------------- /scripts/postinst: -------------------------------------------------------------------------------- 1 | #!/bin/bash -eux 2 | 3 | source `dirname $0`/common-vars.sh 4 | 5 | ######################################## 6 | # Preserving results of the user setup # 7 | ######################################## 8 | 9 | echo "OPENHAB_HTTP_ADDRESS=\"$OPENHAB_HTTP_ADDRESS\"" > ${SYNOPKG_PKGDEST_OPENHAB_ENV} 10 | echo "OPENHAB_HTTP_PORT=\"$OPENHAB_HTTP_PORT\"" >> ${SYNOPKG_PKGDEST_OPENHAB_ENV} 11 | echo "OPENHAB_HTTPS_PORT=\"$OPENHAB_HTTPS_PORT\"" >> ${SYNOPKG_PKGDEST_OPENHAB_ENV} 12 | 13 | echo "ORG_APACHE_KARAF_STARTREMOTESHELL=\"$ORG_APACHE_KARAF_STARTREMOTESHELL\"" >> ${SYNOPKG_PKGDEST_OPENHAB_ENV} 14 | echo "ORG_APACHE_KARAF_SHELL_SSHHOST=\"$ORG_APACHE_KARAF_SHELL_SSHHOST\"" >> ${SYNOPKG_PKGDEST_OPENHAB_ENV} 15 | echo "ORG_APACHE_KARAF_SHELL_SSHPORT=\"$ORG_APACHE_KARAF_SHELL_SSHPORT\"" >> ${SYNOPKG_PKGDEST_OPENHAB_ENV} 16 | 17 | echo "EXTRA_JAVA_OPTS=\"$EXTRA_JAVA_OPTS\"" >> ${SYNOPKG_PKGDEST_OPENHAB_ENV} 18 | 19 | ################################ 20 | # Removing old links in PKGVAR # 21 | ################################ 22 | 23 | [ -L "${SYNOPKG_PKGVAR}/addons" ] && rm "${SYNOPKG_PKGVAR}/addons" 24 | [ -L "${SYNOPKG_PKGVAR}/conf" ] && rm "${SYNOPKG_PKGVAR}/conf" 25 | 26 | ################################## 27 | # Linking from PKGDEST to PKGVAR # 28 | ################################## 29 | 30 | # ./addons 31 | [[ ! -z "${SYNOPKG_PKGVAR}" ]] && [[ ! -d "${SYNOPKG_PKGVAR}/addons" ]] && mv "${PKGDEST_OPENHAB}/addons" "${SYNOPKG_PKGVAR}" 32 | [[ -d "${PKGDEST_OPENHAB}/addons" ]] && rm -rf "${PKGDEST_OPENHAB}/addons" 33 | ln -s "${SYNOPKG_PKGVAR}/addons" "${PKGDEST_OPENHAB}/addons" 34 | 35 | # ./conf 36 | [[ ! -z "${SYNOPKG_PKGVAR}" ]] && [[ ! -d "${SYNOPKG_PKGVAR}/conf" ]] && mv "${PKGDEST_OPENHAB}/conf" "${SYNOPKG_PKGVAR}" 37 | [[ -d "${PKGDEST_OPENHAB}/conf" ]] && rm -rf "${PKGDEST_OPENHAB}/conf" 38 | ln -s "${SYNOPKG_PKGVAR}/conf" "${PKGDEST_OPENHAB}/conf" 39 | 40 | ################################## 41 | # Linking from PKGDEST to PKGVAR # 42 | ################################## 43 | 44 | # TODO: Add if clause here whether to distribute on share 45 | 46 | # ./addons 47 | [[ -d "${SHARE_OPENHAB}" ]] && [[ ! -d "${SHARE_OPENHAB}/addons" ]] && mv "${SYNOPKG_PKGVAR}/addons" "${SHARE_OPENHAB}" 48 | [[ -d "${SYNOPKG_PKGVAR}/addons" ]] && rm -rf "${SYNOPKG_PKGVAR}/addons" 49 | ln -s "${SHARE_OPENHAB}/addons" "${SYNOPKG_PKGVAR}/addons" 50 | 51 | # ./conf 52 | [[ -d "${SHARE_OPENHAB}" ]] && [[ ! -d "${SHARE_OPENHAB}/conf" ]] && mv "${SYNOPKG_PKGVAR}/conf" "${SHARE_OPENHAB}" 53 | [[ -d "${SYNOPKG_PKGVAR}/conf" ]] && rm -rf "${SYNOPKG_PKGVAR}/conf" 54 | ln -s "${SHARE_OPENHAB}/conf" "${SYNOPKG_PKGVAR}/conf" 55 | 56 | exit 0 57 | -------------------------------------------------------------------------------- /WIZARD_UIFILES/install_uifile: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "step_title": "Basic settings", 4 | "items": [ 5 | { 6 | "type": "textfield", 7 | "desc": "webinterface:", 8 | "subitems": [ 9 | { 10 | "key": "OPENHAB_HTTP_ADDRESS", 11 | "desc": "Listen address", 12 | "defaultValue": "0.0.0.0", 13 | "emptyText": "0.0.0.0" 14 | }, 15 | { 16 | "key": "OPENHAB_HTTP_PORT", 17 | "desc": "HTTP Port", 18 | "defaultValue": "8080", 19 | "emptyText": "8080", 20 | "validator": { 21 | "allowBlank": false, 22 | "minLength": 4, 23 | "maxLength": 5, 24 | "regex": { 25 | "expr": "/[0-9]{4,5}/i", 26 | "errorText": "Error: HTTP Port must consist of 4 to 5 numbers." 27 | } 28 | } 29 | }, 30 | { 31 | "key": "OPENHAB_HTTPS_PORT", 32 | "desc": "HTTPS Port", 33 | "defaultValue": "8443", 34 | "emptyText": "8443", 35 | "validator": { 36 | "allowBlank": false, 37 | "minLength": 4, 38 | "maxLength": 5, 39 | "regex": { 40 | "expr": "/[0-9]{4,5}/i", 41 | "errorText": "Error: HTTPS Port must consist of 4 to 5 numbers." 42 | } 43 | } 44 | } 45 | ] 46 | } 47 | ] 48 | }, 49 | { 50 | "step_title": "Expert settings: Karaf framework", 51 | "items": [ 52 | { 53 | "type": "textfield", 54 | "desc": "Choose your ports for openHAB:", 55 | "subitems": [ 56 | { 57 | "key": "ORG_APACHE_KARAF_STARTREMOTESHELL", 58 | "desc": "Start remote shell", 59 | "defaultValue": "true", 60 | "emptyText": "true", 61 | "validator": { 62 | "allowBlank": false 63 | } 64 | }, 65 | { 66 | "key": "ORG_APACHE_KARAF_SHELL_SSHHOST", 67 | "desc": "Listen address", 68 | "defaultValue": "0.0.0.0", 69 | "emptyText": "0.0.0.0" 70 | }, 71 | { 72 | "key": "ORG_APACHE_KARAF_SHELL_SSHPORT", 73 | "desc": "HTTP Port", 74 | "defaultValue": "8101", 75 | "emptyText": "8101", 76 | "validator": { 77 | "allowBlank": false, 78 | "minLength": 4, 79 | "maxLength": 5, 80 | "regex": { 81 | "expr": "/[0-9]{4,5}/i", 82 | "errorText": "Error: HTTP Port must consist of 4 to 5 numbers." 83 | } 84 | } 85 | } 86 | ] 87 | } 88 | ] 89 | }, 90 | { 91 | "step_title": "Expert settings: Java runtime", 92 | "items": [ 93 | { 94 | "type": "textfield", 95 | "desc": "Setup Java related parameters:", 96 | "subitems": [ 97 | { 98 | "key": "EXTRA_JAVA_OPTS", 99 | "desc": "EXTRA_JAVA_OPTS", 100 | "defaultValue": "", 101 | "emptyText": "" 102 | } 103 | ] 104 | } 105 | ] 106 | } 107 | ] 108 | -------------------------------------------------------------------------------- /WIZARD_UIFILES/install_uifile.sh: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "step_title": "Basic settings", 4 | "items": [ 5 | { 6 | "type": "textfield", 7 | "desc": "webinterface:", 8 | "subitems": [ 9 | { 10 | "key": "OPENHAB_HTTP_ADDRESS", 11 | "desc": "Listen address", 12 | "defaultValue": "0.0.0.0", 13 | "emptyText": "0.0.0.0" 14 | }, 15 | { 16 | "key": "OPENHAB_HTTP_PORT", 17 | "desc": "HTTP Port", 18 | "defaultValue": "8080", 19 | "emptyText": "8080", 20 | "validator": { 21 | "allowBlank": false, 22 | "minLength": 4, 23 | "maxLength": 5, 24 | "regex": { 25 | "expr": "/[0-9]{4,5}/i", 26 | "errorText": "Error: HTTP Port must consist of 4 to 5 numbers." 27 | } 28 | } 29 | }, 30 | { 31 | "key": "OPENHAB_HTTPS_PORT", 32 | "desc": "HTTPS Port", 33 | "defaultValue": "8443", 34 | "emptyText": "8443", 35 | "validator": { 36 | "allowBlank": false, 37 | "minLength": 4, 38 | "maxLength": 5, 39 | "regex": { 40 | "expr": "/[0-9]{4,5}/i", 41 | "errorText": "Error: HTTPS Port must consist of 4 to 5 numbers." 42 | } 43 | } 44 | } 45 | ] 46 | } 47 | ] 48 | }, 49 | { 50 | "step_title": "Expert settings: Karaf framework", 51 | "items": [ 52 | { 53 | "type": "textfield", 54 | "desc": "Choose your ports for openhab:", 55 | "subitems": [ 56 | { 57 | "key": "ORG_APACHE_KARAF_STARTREMOTESHELL", 58 | "desc": "Start remote shell", 59 | "defaultValue": "true", 60 | "emptyText": "true", 61 | "validator": { 62 | "allowBlank": false 63 | } 64 | }, 65 | { 66 | "key": "ORG_APACHE_KARAF_SHELL_SSHHOST", 67 | "desc": "Listen address", 68 | "defaultValue": "0.0.0.0", 69 | "emptyText": "0.0.0.0" 70 | }, 71 | { 72 | "key": "ORG_APACHE_KARAF_SHELL_SSHPORT", 73 | "desc": "HTTP Port", 74 | "defaultValue": "8101", 75 | "emptyText": "8101", 76 | "validator": { 77 | "allowBlank": false, 78 | "minLength": 4, 79 | "maxLength": 5, 80 | "regex": { 81 | "expr": "/[0-9]{4,5}/i", 82 | "errorText": "Error: HTTP Port must consist of 4 to 5 numbers." 83 | } 84 | } 85 | } 86 | ] 87 | } 88 | ] 89 | }, 90 | { 91 | "step_title": "Expert settings: Java runtime", 92 | "items": [ 93 | { 94 | "type": "textfield", 95 | "desc": "Setup Java related parameters:", 96 | "subitems": [ 97 | { 98 | "key": "EXTRA_JAVA_OPTS", 99 | "desc": "EXTRA_JAVA_OPTS", 100 | "defaultValue": "", 101 | "emptyText": "" 102 | } 103 | ] 104 | } 105 | ] 106 | } 107 | ] 108 | -------------------------------------------------------------------------------- /WIZARD_UIFILES/upgrade_uifile: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "step_title": "Basic settings", 4 | "items": [ 5 | { 6 | "type": "textfield", 7 | "desc": "webinterface:", 8 | "subitems": [ 9 | { 10 | "key": "OPENHAB_HTTP_ADDRESS", 11 | "desc": "Listen address", 12 | "defaultValue": "0.0.0.0", 13 | "emptyText": "0.0.0.0" 14 | }, 15 | { 16 | "key": "OPENHAB_HTTP_PORT", 17 | "desc": "HTTP Port", 18 | "defaultValue": "8080", 19 | "emptyText": "8080", 20 | "validator": { 21 | "allowBlank": false, 22 | "minLength": 4, 23 | "maxLength": 5, 24 | "regex": { 25 | "expr": "/[0-9]{4,5}/i", 26 | "errorText": "Error: HTTP Port must consist of 4 to 5 numbers." 27 | } 28 | } 29 | }, 30 | { 31 | "key": "OPENHAB_HTTPS_PORT", 32 | "desc": "HTTPS Port", 33 | "defaultValue": "8443", 34 | "emptyText": "8443", 35 | "validator": { 36 | "allowBlank": false, 37 | "minLength": 4, 38 | "maxLength": 5, 39 | "regex": { 40 | "expr": "/[0-9]{4,5}/i", 41 | "errorText": "Error: HTTPS Port must consist of 4 to 5 numbers." 42 | } 43 | } 44 | } 45 | ] 46 | } 47 | ] 48 | }, 49 | { 50 | "step_title": "Expert settings: Karaf framework", 51 | "items": [ 52 | { 53 | "type": "textfield", 54 | "desc": "Choose your ports for openHAB:", 55 | "subitems": [ 56 | { 57 | "key": "ORG_APACHE_KARAF_STARTREMOTESHELL", 58 | "desc": "Start remote shell", 59 | "defaultValue": "true", 60 | "emptyText": "true", 61 | "validator": { 62 | "allowBlank": false 63 | } 64 | }, 65 | { 66 | "key": "ORG_APACHE_KARAF_SHELL_SSHHOST", 67 | "desc": "Listen address", 68 | "defaultValue": "0.0.0.0", 69 | "emptyText": "0.0.0.0" 70 | }, 71 | { 72 | "key": "ORG_APACHE_KARAF_SHELL_SSHPORT", 73 | "desc": "HTTP Port", 74 | "defaultValue": "8101", 75 | "emptyText": "8101", 76 | "validator": { 77 | "allowBlank": false, 78 | "minLength": 4, 79 | "maxLength": 5, 80 | "regex": { 81 | "expr": "/[0-9]{4,5}/i", 82 | "errorText": "Error: HTTP Port must consist of 4 to 5 numbers." 83 | } 84 | } 85 | } 86 | ] 87 | } 88 | ] 89 | }, 90 | { 91 | "step_title": "Expert settings: Java runtime", 92 | "items": [ 93 | { 94 | "type": "textfield", 95 | "desc": "Setup Java related parameters:", 96 | "subitems": [ 97 | { 98 | "key": "EXTRA_JAVA_OPTS", 99 | "desc": "EXTRA_JAVA_OPTS", 100 | "defaultValue": "", 101 | "emptyText": "" 102 | } 103 | ] 104 | } 105 | ] 106 | } 107 | ] 108 | -------------------------------------------------------------------------------- /WIZARD_UIFILES/upgrade_uifile.sh: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "step_title": "Basic settings", 4 | "items": [ 5 | { 6 | "type": "textfield", 7 | "desc": "webinterface:", 8 | "subitems": [ 9 | { 10 | "key": "OPENHAB_HTTP_ADDRESS", 11 | "desc": "Listen address", 12 | "defaultValue": "0.0.0.0", 13 | "emptyText": "0.0.0.0" 14 | }, 15 | { 16 | "key": "OPENHAB_HTTP_PORT", 17 | "desc": "HTTP Port", 18 | "defaultValue": "8080", 19 | "emptyText": "8080", 20 | "validator": { 21 | "allowBlank": false, 22 | "minLength": 4, 23 | "maxLength": 5, 24 | "regex": { 25 | "expr": "/[0-9]{4,5}/i", 26 | "errorText": "Error: HTTP Port must consist of 4 to 5 numbers." 27 | } 28 | } 29 | }, 30 | { 31 | "key": "OPENHAB_HTTPS_PORT", 32 | "desc": "HTTPS Port", 33 | "defaultValue": "8443", 34 | "emptyText": "8443", 35 | "validator": { 36 | "allowBlank": false, 37 | "minLength": 4, 38 | "maxLength": 5, 39 | "regex": { 40 | "expr": "/[0-9]{4,5}/i", 41 | "errorText": "Error: HTTPS Port must consist of 4 to 5 numbers." 42 | } 43 | } 44 | } 45 | ] 46 | } 47 | ] 48 | }, 49 | { 50 | "step_title": "Expert settings: Karaf framework", 51 | "items": [ 52 | { 53 | "type": "textfield", 54 | "desc": "Choose your ports for openhab:", 55 | "subitems": [ 56 | { 57 | "key": "ORG_APACHE_KARAF_STARTREMOTESHELL", 58 | "desc": "Start remote shell", 59 | "defaultValue": "true", 60 | "emptyText": "true", 61 | "validator": { 62 | "allowBlank": false 63 | } 64 | }, 65 | { 66 | "key": "ORG_APACHE_KARAF_SHELL_SSHHOST", 67 | "desc": "Listen address", 68 | "defaultValue": "0.0.0.0", 69 | "emptyText": "0.0.0.0" 70 | }, 71 | { 72 | "key": "ORG_APACHE_KARAF_SHELL_SSHPORT", 73 | "desc": "HTTP Port", 74 | "defaultValue": "8101", 75 | "emptyText": "8101", 76 | "validator": { 77 | "allowBlank": false, 78 | "minLength": 4, 79 | "maxLength": 5, 80 | "regex": { 81 | "expr": "/[0-9]{4,5}/i", 82 | "errorText": "Error: HTTP Port must consist of 4 to 5 numbers." 83 | } 84 | } 85 | } 86 | ] 87 | } 88 | ] 89 | }, 90 | { 91 | "step_title": "Expert settings: Java runtime", 92 | "items": [ 93 | { 94 | "type": "textfield", 95 | "desc": "Setup Java related parameters:", 96 | "subitems": [ 97 | { 98 | "key": "EXTRA_JAVA_OPTS", 99 | "desc": "EXTRA_JAVA_OPTS", 100 | "defaultValue": "", 101 | "emptyText": "" 102 | } 103 | ] 104 | } 105 | ] 106 | } 107 | ] 108 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # openhab-syno-spk - Synology DSM Software Package 2 | 3 | This project build a Synology DiskStation SPK install package for [openHAB](https://www.openhab.org) (Home Automation Server). 4 | 5 | Comments, suggestions and contributions are welcome! 6 | 7 | ## License 8 | These packaging files are licensed as follows: [LICENSE](https://raw.githubusercontent.com/openhab/openhab-syno-spk/master/LICENSE) 9 | Please inform yourself of the other licenses used by the software which come with openHAB and openHAB itself. While using these packaging files and all contents of resulting software package, you agreee with all licenses included. 10 | ## Download 11 | 12 | Download the SPK package from the [releases section](https://github.com/openhab/openhab-syno-spk/releases) and follow the instructions below. 13 | 14 | ## Documentation 15 | 16 | ### Prerequirements 17 | * Download the SPK from our project package. You will find per OpenHAB release one download. The package comes with all required software. 18 | * (Backup and) uninstall the previous installation based on our old package. You can identify the old package by it's icon. \ 19 | ![image](https://user-images.githubusercontent.com/1847437/105901208-54535e80-601d-11eb-9228-0cd2ac720e05.png) 20 | 21 | ### Installation 22 | 1. Open your "Package Center" and click on the "Manual Install" button to start the install using the SPK file you have downloaded. \ 23 | ![Screenshot_20210104_194226](https://user-images.githubusercontent.com/1847437/105900269-17d33300-601c-11eb-8370-9f855a727502.png) 24 | 2. Click on the "Browse" button and select the SPK file you wish to install. \ 25 | ![Screenshot_20210104_194650](https://user-images.githubusercontent.com/1847437/105900313-2883a900-601c-11eb-896e-9846d9df86c7.png) 26 | 3. Configure your installation by making adjustments on the following pages. Generally we recommend to keep the default settins. Especially on the expert pages. 27 | 4. Confirm the installation 28 | 29 | 5. Optional: Register the Z-Wave script to be executed on system start. It is required to give OpenHAB permissions to access your dongle. 30 | 1. Open your "Control Panel" \ 31 | ![Screenshot_20210126_204910](https://user-images.githubusercontent.com/1847437/105899967-b1e6ab80-601b-11eb-9d33-2974ff2a2ebe.png) 32 | 2. Choose "Task Scheduler" \ 33 | ![Screenshot_20210126_212029](https://user-images.githubusercontent.com/1847437/105900458-5bc63800-601c-11eb-8875-7011c45a38ce.png) 34 | 3. Create a new "Triggered Task" based on a "User-defined script". \ 35 | ![Screenshot_20210126_212128](https://user-images.githubusercontent.com/1847437/105900639-9d56e300-601c-11eb-91a9-d2c28bbf933e.png) 36 | 4. Call the rule "openHAB Enable serial", choose as user root and ensure the event "Boot-up" is selected. \ 37 | ![Screenshot_20210126_212319](https://user-images.githubusercontent.com/1847437/105900767-cd05eb00-601c-11eb-9c6e-2a9f9b634c26.png) 38 | 5. Continue in the "Task Settings" tab and insert 'bash /var/packages/openHAB/target/helper/serial-enable.sh' as user-defined script. \ 39 | ![Screenshot_20210126_212343](https://user-images.githubusercontent.com/1847437/105900813-da22da00-601c-11eb-84e9-cb602e99cc58.png) 40 | 6. [You can find the content of the script for technical details here in the repo](helper/serial-enable.sh). 41 | 42 | 43 | ## Troubleshooting 44 | The openHAB log files can be found here: 45 | * `/var/log/packages/openHAB.log` - Made by Synology's software center 46 | * `/var/packages/openHAB/userdata/logs/` - General logs made by openHAB instance 47 | * `/var/packages/openHAB/openHAB.log` - Log made by the service management 48 | 49 | ## Contributing 50 | 51 | [![GitHub issues](https://img.shields.io/github/issues/openhab/openhab-syno-spk.svg)](https://github.com/openhab/openhab-syno-spk/issues) [![GitHub forks](https://img.shields.io/github/forks/openhab/openhab-syno-spk.svg)](https://github.com/openhab/openhab-syno-spk/network) [![GitHub stars](https://img.shields.io/github/stars/openhab/openhab-syno-spk.svg)](https://github.com/openhab/openhab-syno-spk/stargazers) 52 | 53 | [Contribution guidelines](https://github.com/openhab/openhab-syno-spk/blob/master/CONTRIBUTING.md) 54 | ## Useful links: 55 | * [openHAB Community](https://community.openhab.org/t/synology-diskstation/1446) 56 | * [Gitter Chat](https://gitter.im/openhab/openhab-syno-spk?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) 57 | * [Build](https://travis-ci.org/openhab/openhab-syno-spk) 58 | 59 | -------------------------------------------------------------------------------- /ui/oh2manager.js: -------------------------------------------------------------------------------- 1 | // Ext JS namespace 2 | Ext.ns("SYNO.SDS.OH2"); 3 | 4 | // Translator 5 | _V = function (category, element) { 6 | var translation = _TT("SYNO.SDS.OH2.Instance", category, element); 7 | console.log(translation); 8 | return translation; 9 | }; 10 | 11 | // The application instance that gets called when clicking on the menu icon. 12 | SYNO.SDS.OH2.Instance = Ext.extend(SYNO.SDS.AppInstance, { 13 | appWindowName: "SYNO.SDS.OH2.MainWindow", 14 | constructor: function () { 15 | SYNO.SDS.OH2.Instance.superclass.constructor.apply(this, arguments); 16 | }, 17 | }); 18 | 19 | // The application window that gets displayed. 20 | SYNO.SDS.OH2.MainWindow = Ext.extend(SYNO.SDS.AppWindow, { 21 | appInstance: null, 22 | formPanel: null, 23 | constructor: function (a) { 24 | this.appInstance = a.appInstance; 25 | this.formPanel = new SYNO.SDS.OH2.MainCardPanel({ 26 | module: this, 27 | owner: a.owner, 28 | app: this.app, 29 | itemId: "grid", 30 | region: "center", 31 | }); 32 | this.id_panel = [["test", this.formPanel.PanelTest]]; 33 | SYNO.SDS.OH2.MainWindow.superclass.constructor.call( 34 | this, 35 | Ext.apply( 36 | { 37 | resizable: false, 38 | maximizable: false, 39 | minimizable: true, 40 | width: 300, 41 | height: 200, 42 | layout: "fit", 43 | items: [this.formPanel], 44 | }, 45 | a 46 | ) 47 | ); 48 | }, 49 | onOpen: function (a) { 50 | SYNO.SDS.OH2.MainWindow.superclass.onOpen.call(this, a); 51 | }, 52 | onRequest: function (a) { 53 | SYNO.SDS.OH2.MainWindow.superclass.onRequest.call(this, a); 54 | }, 55 | onClose: function () { 56 | this.doClose(); 57 | 58 | return false; 59 | }, 60 | }); 61 | 62 | // Card panel 63 | SYNO.SDS.OH2.MainCardPanel = Ext.extend(Ext.Panel, { 64 | PanelTest: null, 65 | constructor: function (a) { 66 | this.app = a.app; 67 | this.PanelTest = new SYNO.SDS.OH2.PanelTest({ app: this.app }); 68 | SYNO.SDS.OH2.MainCardPanel.superclass.constructor.call( 69 | this, 70 | Ext.apply( 71 | { 72 | activeItem: 0, 73 | layout: "card", 74 | items: [this.PanelTest], 75 | border: false, 76 | listeners: { 77 | scope: this, 78 | activate: this.onActivate, 79 | deactivate: this.onDeactivate, 80 | }, 81 | }, 82 | a 83 | ) 84 | ); 85 | }, 86 | onActivate: function (a) { 87 | if (this.PanelTest) { 88 | this.PanelTest.load(); 89 | } 90 | }, 91 | onDeactivate: function (a) {}, 92 | }); 93 | 94 | // Test panel 95 | SYNO.SDS.OH2.PanelTest = Ext.extend(Ext.FormPanel, { 96 | constructor: function (a) { 97 | this.app = a.app; 98 | SYNO.SDS.OH2.PanelTest.superclass.constructor.call( 99 | this, 100 | Ext.apply( 101 | { 102 | border: false, 103 | labelWidth: 125, 104 | bodyStyle: "padding: 5px 5px 0", 105 | monitorValid: true, 106 | items: [ 107 | { 108 | xtype: "fieldset", 109 | title: _V("config", "fieldset_test"), 110 | defaultType: "textfield", 111 | defaults: { 112 | anchor: "-20", 113 | }, 114 | }, 115 | ], 116 | buttons: [ 117 | { 118 | text: _T("common", "apply"), 119 | handler: function () { 120 | this.getForm().submit(); 121 | }, 122 | scope: this, 123 | }, 124 | ], 125 | }, 126 | a 127 | ) 128 | ); 129 | this.on("beforeaction", function (form, action) { 130 | this.app.setStatusBusy(); 131 | }); 132 | this.on("actioncomplete", function (form, action) { 133 | this.app.clearStatusBusy(); 134 | if (action.type == "directsubmit") { 135 | this.app.setStatusOK({ text: _V("messages", "saved") }); 136 | } 137 | }); 138 | this.on("actionfailed", function (form, action) { 139 | this.app.clearStatusBusy(); 140 | if (action.type == "directsubmit") { 141 | this.app.setStatusError({ clear: true }); 142 | if (action.failureType == Ext.form.Action.SERVER_INVALID) { 143 | for (field in action.result.myerrors) { 144 | this.getForm().findField(field).markInvalid(); 145 | } 146 | } 147 | } else { 148 | this.app.setStatusError(); 149 | } 150 | }); 151 | }, 152 | }); 153 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | ## Contribution guidelines 2 | 3 | ### Pull requests are always welcome 4 | 5 | We are always thrilled to receive pull requests, and do our best to 6 | process them as fast as possible. Not sure if that typo is worth a pull 7 | request? Do it! We will appreciate it. 8 | 9 | If your pull request is not accepted on the first try, don't be 10 | discouraged! If there's a problem with the implementation, hopefully you 11 | received feedback on what to improve. 12 | 13 | We're trying very hard to keep openHAB lean and focused. We don't want it 14 | to do everything for everybody. This means that we might decide against 15 | incorporating a new feature. However, there might be a way to implement 16 | that feature *on top of* openHAB. 17 | 18 | ### Discuss your design on the mailing list 19 | 20 | We recommend discussing your plans [in the discussion forum](https://community.openhab.org/) 21 | before starting to code - especially for more ambitious contributions. 22 | This gives other contributors a chance to point you in the right 23 | direction, give feedback on your design, and maybe point out if someone 24 | else is working on the same thing. 25 | 26 | ### Create issues... 27 | 28 | Any significant improvement should be documented as [a GitHub 29 | issue](https://github.com/openhab/openhab-docker/issues?labels=enhancement&page=1&state=open) before anybody 30 | starts working on it. 31 | 32 | ### ...but check for existing issues first! 33 | 34 | Please take a moment to check that an issue doesn't already exist 35 | documenting your bug report or improvement proposal. If it does, it 36 | never hurts to add a quick "+1" or "I have this problem too". This will 37 | help prioritize the most common problems and requests. 38 | 39 | ### Conventions 40 | 41 | Fork the repo and make changes on your fork in a feature branch. 42 | 43 | Update the documentation when creating or modifying features. Test 44 | your documentation changes for clarity, concision, and correctness, as 45 | well as a clean documentation build. 46 | 47 | Write clean code. Universally formatted code promotes ease of writing, reading, 48 | and maintenance. 49 | 50 | Pull requests descriptions should be as clear as possible and include a 51 | reference to all the issues that they address. 52 | 53 | Pull requests must not contain commits from other users or branches. 54 | 55 | Commit messages must start with a capitalized and short summary (max. 50 56 | chars) written in the imperative, followed by an optional, more detailed 57 | explanatory text which is separated from the summary by an empty line. 58 | 59 | Code review comments may be added to your pull request. Discuss, then make the 60 | suggested modifications and push additional commits to your feature branch. Be 61 | sure to post a comment after pushing. The new commits will show up in the pull 62 | request automatically, but the reviewers will not be notified unless you 63 | comment. 64 | 65 | Before the pull request is merged, make sure that you squash your commits into 66 | logical units of work using `git rebase -i` and `git push -f`. After every 67 | commit the test suite should be passing. Include documentation changes in the 68 | same commit so that a revert would remove all traces of the feature or fix. 69 | 70 | Commits that fix or close an issue should include a reference like `Closes #XXX` 71 | or `Fixes #XXX`, which will automatically close the issue when merged. 72 | 73 | ### Merge approval 74 | 75 | openHAB maintainers use LGTM (Looks Good To Me) in comments on the code review 76 | to indicate acceptance. 77 | 78 | ### Sign your work 79 | 80 | The sign-off is a simple line at the end of the explanation for the 81 | patch, which certifies that you wrote it or otherwise have the right to 82 | pass it on as an open-source patch. The rules are pretty simple: if you 83 | can certify the below (from 84 | [developercertificate.org](http://developercertificate.org/)): 85 | 86 | ``` 87 | Developer Certificate of Origin 88 | Version 1.1 89 | 90 | Copyright (C) 2004, 2006 The Linux Foundation and its contributors. 91 | 660 York Street, Suite 102, 92 | San Francisco, CA 94110 USA 93 | 94 | Everyone is permitted to copy and distribute verbatim copies of this 95 | license document, but changing it is not allowed. 96 | 97 | 98 | Developer's Certificate of Origin 1.1 99 | 100 | By making a contribution to this project, I certify that: 101 | 102 | (a) The contribution was created in whole or in part by me and I 103 | have the right to submit it under the open source license 104 | indicated in the file; or 105 | 106 | (b) The contribution is based upon previous work that, to the best 107 | of my knowledge, is covered under an appropriate open source 108 | license and I have the right under that license to submit that 109 | work with modifications, whether created in whole or in part 110 | by me, under the same open source license (unless I am 111 | permitted to submit under a different license), as indicated 112 | in the file; or 113 | 114 | (c) The contribution was provided directly to me by some other 115 | person who certified (a), (b) or (c) and I have not modified 116 | it. 117 | 118 | (d) I understand and agree that this project and the contribution 119 | are public and that a record of the contribution (including all 120 | personal information I submit with it, including my sign-off) is 121 | maintained indefinitely and may be redistributed consistent with 122 | this project or the open source license(s) involved. 123 | ``` 124 | 125 | then you just add a line to every git commit message: 126 | 127 | Signed-off-by: Joe Smith (github: github_handle) 128 | 129 | using your real name (sorry, no pseudonyms or anonymous contributions.) 130 | 131 | #### Small patch exception 132 | 133 | There are several exceptions to the signing requirement. Currently these are: 134 | 135 | * Your patch fixes spelling or grammar errors. 136 | * Your patch is a single line change to documentation. 137 | 138 | ## Community Guidelines 139 | 140 | We want to keep the openHAB community awesome, growing and collaborative. We 141 | need your help to keep it that way. To help with this we've come up with some 142 | general guidelines for the community as a whole: 143 | 144 | * Be nice: Be courteous, respectful and polite to fellow community members: no 145 | regional, racial, gender, or other abuse will be tolerated. We like nice people 146 | way better than mean ones! 147 | 148 | * Encourage diversity and participation: Make everyone in our community 149 | feel welcome, regardless of their background and the extent of their 150 | contributions, and do everything possible to encourage participation in 151 | our community. 152 | 153 | * Keep it legal: Basically, don't get us in trouble. Share only content that 154 | you own, do not share private or sensitive information, and don't break the 155 | law. 156 | 157 | * Stay on topic: Make sure that you are posting to the correct channel 158 | and avoid off-topic discussions. Remember when you update an issue or 159 | respond to an email you are potentially sending to a large number of 160 | people. Please consider this before you update. Also remember that 161 | nobody likes spam. 162 | -------------------------------------------------------------------------------- /scripts/start-stop-status: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | source `dirname $0`/common-vars.sh 4 | source "${SYNOPKG_PKGDEST_OPENHAB_ENV}" 5 | 6 | # Licensed to the Apache Software Foundation (ASF) under one or more 7 | # contributor license agreements. See the NOTICE file distributed with 8 | # this work for additional information regarding copyright ownership. 9 | # The ASF licenses this file to You under the Apache License, Version 2.0 10 | # (the "License"); you may not use this file except in compliance with 11 | # the License. You may obtain a copy of the License at 12 | # 13 | # http://www.apache.org/licenses/LICENSE-2.0 14 | # 15 | # Unless required by applicable law or agreed to in writing, software 16 | # distributed under the License is distributed on an "AS IS" BASIS, 17 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | # See the License for the specific language governing permissions and 19 | # limitations under the License. 20 | # 21 | # Karaf control script 22 | # description: Karaf startup script 23 | # processname: ${KARAF_SERVICE_NAME} 24 | # pidfile: ${KARAF_SERVICE_PIDFILE} 25 | # config: ${KARAF_SERVICE_CONF} 26 | # 27 | 28 | ################################################ 29 | 30 | KARAF_SERVICE_CONF=`dirname $0`/karaf-service.sh 31 | 32 | ################################################ 33 | 34 | if [ -r "${KARAF_SERVICE_CONF}" ]; then 35 | . "${KARAF_SERVICE_CONF}" 36 | else 37 | echo "Error KARAF_SERVICE_CONF not defined" 38 | exit -1 39 | fi 40 | 41 | # Location of JDK 42 | if [ -n "$JAVA_HOME" ]; then 43 | export JAVA_HOME 44 | fi 45 | 46 | # Setup the JVM 47 | if [ -z "$JAVA" ]; then 48 | if [ -n "$JAVA_HOME" ]; then 49 | JAVA="$JAVA_HOME/bin/java" 50 | else 51 | JAVA="java" 52 | fi 53 | fi 54 | 55 | if [ -z "$STARTUP_WAIT" ]; then 56 | STARTUP_WAIT=30 57 | fi 58 | 59 | if [ -z "$SHUTDOWN_WAIT" ]; then 60 | SHUTDOWN_WAIT=30 61 | fi 62 | 63 | prog=${KARAF_SERVICE_NAME} 64 | 65 | do_prestart() { 66 | [[ ! -d "$JAVA_HOME" ]] && echo "JAVA_HOME does not exist at: $JAVA_HOME" && exit 1 67 | 68 | # TODO: Adding our if-clause here whether to expose on share or not 69 | # TODO: Remove this stuff once we can read them out via Syno app 70 | [[ -f "${SHARE_OPENHAB}/uuid" ]] && rm ${SHARE_OPENHAB}/uuid 71 | [[ -f "${PKGDEST_OPENHAB}/userdata/uuid" ]] && cp "${PKGDEST_OPENHAB}/userdata/uuid" ${SHARE_OPENHAB} 72 | 73 | [[ -f "${SHARE_OPENHAB}/openhabcloud-secret" ]] && rm ${SHARE_OPENHAB}/openhabcloud-secret 74 | [[ -f "${PKGDEST_OPENHAB}/userdata/openhabcloud/secret" ]] && cp "${PKGDEST_OPENHAB}/userdata/openhabcloud/secret" ${SHARE_OPENHAB}/openhabcloud-secret 75 | 76 | exit 0 77 | } 78 | 79 | do_start() { 80 | echo "Starting $prog: " 81 | if [ -f "$KARAF_SERVICE_PIDFILE" ]; then 82 | read ppid < "$KARAF_SERVICE_PIDFILE" 83 | if [ `ps -p $ppid 2> /dev/null | grep -c $ppid 2> /dev/null` -eq '1' ]; then 84 | echo "$prog is already running" 85 | return 1 86 | else 87 | rm -f "$KARAF_SERVICE_PIDFILE" 88 | fi 89 | fi 90 | 91 | LOG_PATH=`dirname "$KARAF_SERVICE_LOG"` 92 | mkdir -p "$LOG_PATH" 93 | cat /dev/null > "$KARAF_SERVICE_LOG" 94 | chown $KARAF_SERVICE_USER:$KARAF_SERVICE_GROUP "$KARAF_SERVICE_LOG" 95 | 96 | PID_PATH=`dirname "$KARAF_SERVICE_PIDFILE"` 97 | mkdir -p "$PID_PATH" 98 | chown $KARAF_SERVICE_USER:$KARAF_SERVICE_GROUP "$PID_PATH" || true 99 | 100 | if [ ! -z "$KARAF_SERVICE_USER" ]; then 101 | KARAF_EXEC=exec 102 | export KARAF_EXEC 103 | 104 | echo " * OPENHAB_HTTP_ADDRESS: $OPENHAB_HTTP_ADDRESS" 105 | export OPENHAB_HTTP_ADDRESS 106 | echo " * OPENHAB_HTTP_PORT: $OPENHAB_HTTP_PORT" 107 | export OPENHAB_HTTP_PORT 108 | echo " * OPENHAB_HTTPS_PORT: $OPENHAB_HTTPS_PORT" 109 | export OPENHAB_HTTPS_PORT 110 | 111 | echo " * ORG_APACHE_KARAF_STARTREMOTESHELL: $ORG_APACHE_KARAF_STARTREMOTESHELL" 112 | export ORG_APACHE_KARAF_STARTREMOTESHELL 113 | echo " * ORG_APACHE_KARAF_SHELL_SSHHOST: $ORG_APACHE_KARAF_SHELL_SSHHOST" 114 | export ORG_APACHE_KARAF_SHELL_SSHHOST 115 | echo " * ORG_APACHE_KARAF_SHELL_SSHPORT: $ORG_APACHE_KARAF_SHELL_SSHPORT" 116 | export ORG_APACHE_KARAF_SHELL_SSHPORT 117 | 118 | echo " * EXTRA_JAVA_OPTS $EXTRA_JAVA_OPTS" 119 | export EXTRA_JAVA_OPTS 120 | 121 | "$KARAF_SERVICE_PATH/bin/$KARAF_SERVICE_EXECUTABLE" daemon >> "$KARAF_SERVICE_LOG" 2>&1 & 122 | 123 | echo $! > "$KARAF_SERVICE_PIDFILE" 124 | 125 | sleep 1 126 | if [ -f "$KARAF_SERVICE_PIDFILE" ]; then 127 | chown $KARAF_SERVICE_USER:$KARAF_SERVICE_GROUP "$KARAF_SERVICE_PIDFILE" 128 | fi 129 | fi 130 | 131 | RETVAL=$? 132 | return $RETVAL 133 | } 134 | 135 | do_prestop() { 136 | # TODO: Remove this stuff once we can read them out via Syno app 137 | [[ -f "${SHARE_OPENHAB}/uuid" ]] && rm ${SHARE_OPENHAB}/uuid 138 | 139 | [[ -f "${SHARE_OPENHAB}/openhabcloud-secret" ]] && rm ${SHARE_OPENHAB}/openhabcloud-secret 140 | 141 | exit 0 142 | } 143 | 144 | do_stop() { 145 | echo $"Stopping $prog: " 146 | count=0; 147 | 148 | if [ -f "$KARAF_SERVICE_PIDFILE" ]; then 149 | read kpid < "$KARAF_SERVICE_PIDFILE" 150 | kwait=$SHUTDOWN_WAIT 151 | 152 | JAVA_HOME=$JAVA_HOME 153 | export JAVA_HOME 154 | 155 | "$KARAF_SERVICE_PATH/bin/$KARAF_SERVICE_EXECUTABLE" stop >> "$KARAF_SERVICE_LOG" 2>&1 156 | 157 | until [ `ps -p $kpid 2> /dev/null | grep -c $kpid 2> /dev/null` -eq '0' ] || [ $count -gt $kwait ] 158 | do 159 | sleep 1 160 | count=`expr $count + 1` 161 | done 162 | 163 | if [ $count -gt $kwait ]; then 164 | if [ `ps -p $kpid 2> /dev/null | grep -c $kpid 2> /dev/null` -eq '1' ]; then 165 | kill -9 $kpid 166 | fi 167 | fi 168 | fi 169 | 170 | rm -f "$KARAF_SERVICE_PIDFILE" 171 | rm -f $KARAF_LOCKFILE 172 | } 173 | 174 | do_status() { 175 | if [ -f "$KARAF_SERVICE_PIDFILE" ]; then 176 | read ppid < "$KARAF_SERVICE_PIDFILE" 177 | if [ `ps -p $ppid 2> /dev/null | grep -c $ppid 2> /dev/null` -eq '1' ]; then 178 | echo "$prog is running (pid $ppid)" 179 | return 0 180 | else 181 | echo "$prog dead but pid file exists" 182 | return 1 183 | fi 184 | fi 185 | echo "$prog is not running" 186 | return 3 187 | } 188 | 189 | case "$1" in 190 | prestart) 191 | do_prestart 192 | ;; 193 | start) 194 | do_start 195 | ;; 196 | prestop) 197 | do_prestop 198 | ;; 199 | stop) 200 | do_stop 201 | ;; 202 | restart) 203 | do_stop 204 | do_start 205 | ;; 206 | status) 207 | do_status 208 | ;; 209 | log) 210 | echo "${SYNOPKG_PKGDEST}/userdata/logs/openhab.log" 211 | exit 0 212 | ;; 213 | *) 214 | ## If no parameters are given, print which are avaiable. 215 | echo "Usage: $0 {start|stop|status|restart}" 216 | exit 1 217 | ;; 218 | esac 219 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Eclipse Public License - v 2.0 2 | 3 | THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE 4 | PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION 5 | OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. 6 | 7 | 1. DEFINITIONS 8 | 9 | "Contribution" means: 10 | 11 | a) in the case of the initial Contributor, the initial content 12 | Distributed under this Agreement, and 13 | 14 | b) in the case of each subsequent Contributor: 15 | i) changes to the Program, and 16 | ii) additions to the Program; 17 | where such changes and/or additions to the Program originate from 18 | and are Distributed by that particular Contributor. A Contribution 19 | "originates" from a Contributor if it was added to the Program by 20 | such Contributor itself or anyone acting on such Contributor's behalf. 21 | Contributions do not include changes or additions to the Program that 22 | are not Modified Works. 23 | 24 | "Contributor" means any person or entity that Distributes the Program. 25 | 26 | "Licensed Patents" mean patent claims licensable by a Contributor which 27 | are necessarily infringed by the use or sale of its Contribution alone 28 | or when combined with the Program. 29 | 30 | "Program" means the Contributions Distributed in accordance with this 31 | Agreement. 32 | 33 | "Recipient" means anyone who receives the Program under this Agreement 34 | or any Secondary License (as applicable), including Contributors. 35 | 36 | "Derivative Works" shall mean any work, whether in Source Code or other 37 | form, that is based on (or derived from) the Program and for which the 38 | editorial revisions, annotations, elaborations, or other modifications 39 | represent, as a whole, an original work of authorship. 40 | 41 | "Modified Works" shall mean any work in Source Code or other form that 42 | results from an addition to, deletion from, or modification of the 43 | contents of the Program, including, for purposes of clarity any new file 44 | in Source Code form that contains any contents of the Program. Modified 45 | Works shall not include works that contain only declarations, 46 | interfaces, types, classes, structures, or files of the Program solely 47 | in each case in order to link to, bind by name, or subclass the Program 48 | or Modified Works thereof. 49 | 50 | "Distribute" means the acts of a) distributing or b) making available 51 | in any manner that enables the transfer of a copy. 52 | 53 | "Source Code" means the form of a Program preferred for making 54 | modifications, including but not limited to software source code, 55 | documentation source, and configuration files. 56 | 57 | "Secondary License" means either the GNU General Public License, 58 | Version 2.0, or any later versions of that license, including any 59 | exceptions or additional permissions as identified by the initial 60 | Contributor. 61 | 62 | 2. GRANT OF RIGHTS 63 | 64 | a) Subject to the terms of this Agreement, each Contributor hereby 65 | grants Recipient a non-exclusive, worldwide, royalty-free copyright 66 | license to reproduce, prepare Derivative Works of, publicly display, 67 | publicly perform, Distribute and sublicense the Contribution of such 68 | Contributor, if any, and such Derivative Works. 69 | 70 | b) Subject to the terms of this Agreement, each Contributor hereby 71 | grants Recipient a non-exclusive, worldwide, royalty-free patent 72 | license under Licensed Patents to make, use, sell, offer to sell, 73 | import and otherwise transfer the Contribution of such Contributor, 74 | if any, in Source Code or other form. This patent license shall 75 | apply to the combination of the Contribution and the Program if, at 76 | the time the Contribution is added by the Contributor, such addition 77 | of the Contribution causes such combination to be covered by the 78 | Licensed Patents. The patent license shall not apply to any other 79 | combinations which include the Contribution. No hardware per se is 80 | licensed hereunder. 81 | 82 | c) Recipient understands that although each Contributor grants the 83 | licenses to its Contributions set forth herein, no assurances are 84 | provided by any Contributor that the Program does not infringe the 85 | patent or other intellectual property rights of any other entity. 86 | Each Contributor disclaims any liability to Recipient for claims 87 | brought by any other entity based on infringement of intellectual 88 | property rights or otherwise. As a condition to exercising the 89 | rights and licenses granted hereunder, each Recipient hereby 90 | assumes sole responsibility to secure any other intellectual 91 | property rights needed, if any. For example, if a third party 92 | patent license is required to allow Recipient to Distribute the 93 | Program, it is Recipient's responsibility to acquire that license 94 | before distributing the Program. 95 | 96 | d) Each Contributor represents that to its knowledge it has 97 | sufficient copyright rights in its Contribution, if any, to grant 98 | the copyright license set forth in this Agreement. 99 | 100 | e) Notwithstanding the terms of any Secondary License, no 101 | Contributor makes additional grants to any Recipient (other than 102 | those set forth in this Agreement) as a result of such Recipient's 103 | receipt of the Program under the terms of a Secondary License 104 | (if permitted under the terms of Section 3). 105 | 106 | 3. REQUIREMENTS 107 | 108 | 3.1 If a Contributor Distributes the Program in any form, then: 109 | 110 | a) the Program must also be made available as Source Code, in 111 | accordance with section 3.2, and the Contributor must accompany 112 | the Program with a statement that the Source Code for the Program 113 | is available under this Agreement, and informs Recipients how to 114 | obtain it in a reasonable manner on or through a medium customarily 115 | used for software exchange; and 116 | 117 | b) the Contributor may Distribute the Program under a license 118 | different than this Agreement, provided that such license: 119 | i) effectively disclaims on behalf of all other Contributors all 120 | warranties and conditions, express and implied, including 121 | warranties or conditions of title and non-infringement, and 122 | implied warranties or conditions of merchantability and fitness 123 | for a particular purpose; 124 | 125 | ii) effectively excludes on behalf of all other Contributors all 126 | liability for damages, including direct, indirect, special, 127 | incidental and consequential damages, such as lost profits; 128 | 129 | iii) does not attempt to limit or alter the recipients' rights 130 | in the Source Code under section 3.2; and 131 | 132 | iv) requires any subsequent distribution of the Program by any 133 | party to be under a license that satisfies the requirements 134 | of this section 3. 135 | 136 | 3.2 When the Program is Distributed as Source Code: 137 | 138 | a) it must be made available under this Agreement, or if the 139 | Program (i) is combined with other material in a separate file or 140 | files made available under a Secondary License, and (ii) the initial 141 | Contributor attached to the Source Code the notice described in 142 | Exhibit A of this Agreement, then the Program may be made available 143 | under the terms of such Secondary Licenses, and 144 | 145 | b) a copy of this Agreement must be included with each copy of 146 | the Program. 147 | 148 | 3.3 Contributors may not remove or alter any copyright, patent, 149 | trademark, attribution notices, disclaimers of warranty, or limitations 150 | of liability ("notices") contained within the Program from any copy of 151 | the Program which they Distribute, provided that Contributors may add 152 | their own appropriate notices. 153 | 154 | 4. COMMERCIAL DISTRIBUTION 155 | 156 | Commercial distributors of software may accept certain responsibilities 157 | with respect to end users, business partners and the like. While this 158 | license is intended to facilitate the commercial use of the Program, 159 | the Contributor who includes the Program in a commercial product 160 | offering should do so in a manner which does not create potential 161 | liability for other Contributors. Therefore, if a Contributor includes 162 | the Program in a commercial product offering, such Contributor 163 | ("Commercial Contributor") hereby agrees to defend and indemnify every 164 | other Contributor ("Indemnified Contributor") against any losses, 165 | damages and costs (collectively "Losses") arising from claims, lawsuits 166 | and other legal actions brought by a third party against the Indemnified 167 | Contributor to the extent caused by the acts or omissions of such 168 | Commercial Contributor in connection with its distribution of the Program 169 | in a commercial product offering. The obligations in this section do not 170 | apply to any claims or Losses relating to any actual or alleged 171 | intellectual property infringement. In order to qualify, an Indemnified 172 | Contributor must: a) promptly notify the Commercial Contributor in 173 | writing of such claim, and b) allow the Commercial Contributor to control, 174 | and cooperate with the Commercial Contributor in, the defense and any 175 | related settlement negotiations. The Indemnified Contributor may 176 | participate in any such claim at its own expense. 177 | 178 | For example, a Contributor might include the Program in a commercial 179 | product offering, Product X. That Contributor is then a Commercial 180 | Contributor. If that Commercial Contributor then makes performance 181 | claims, or offers warranties related to Product X, those performance 182 | claims and warranties are such Commercial Contributor's responsibility 183 | alone. Under this section, the Commercial Contributor would have to 184 | defend claims against the other Contributors related to those performance 185 | claims and warranties, and if a court requires any other Contributor to 186 | pay any damages as a result, the Commercial Contributor must pay 187 | those damages. 188 | 189 | 5. NO WARRANTY 190 | 191 | EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, AND TO THE EXTENT 192 | PERMITTED BY APPLICABLE LAW, THE PROGRAM IS PROVIDED ON AN "AS IS" 193 | BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR 194 | IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF 195 | TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR 196 | PURPOSE. Each Recipient is solely responsible for determining the 197 | appropriateness of using and distributing the Program and assumes all 198 | risks associated with its exercise of rights under this Agreement, 199 | including but not limited to the risks and costs of program errors, 200 | compliance with applicable laws, damage to or loss of data, programs 201 | or equipment, and unavailability or interruption of operations. 202 | 203 | 6. DISCLAIMER OF LIABILITY 204 | 205 | EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, AND TO THE EXTENT 206 | PERMITTED BY APPLICABLE LAW, NEITHER RECIPIENT NOR ANY CONTRIBUTORS 207 | SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 208 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST 209 | PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 210 | CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 211 | ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE 212 | EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE 213 | POSSIBILITY OF SUCH DAMAGES. 214 | 215 | 7. GENERAL 216 | 217 | If any provision of this Agreement is invalid or unenforceable under 218 | applicable law, it shall not affect the validity or enforceability of 219 | the remainder of the terms of this Agreement, and without further 220 | action by the parties hereto, such provision shall be reformed to the 221 | minimum extent necessary to make such provision valid and enforceable. 222 | 223 | If Recipient institutes patent litigation against any entity 224 | (including a cross-claim or counterclaim in a lawsuit) alleging that the 225 | Program itself (excluding combinations of the Program with other software 226 | or hardware) infringes such Recipient's patent(s), then such Recipient's 227 | rights granted under Section 2(b) shall terminate as of the date such 228 | litigation is filed. 229 | 230 | All Recipient's rights under this Agreement shall terminate if it 231 | fails to comply with any of the material terms or conditions of this 232 | Agreement and does not cure such failure in a reasonable period of 233 | time after becoming aware of such noncompliance. If all Recipient's 234 | rights under this Agreement terminate, Recipient agrees to cease use 235 | and distribution of the Program as soon as reasonably practicable. 236 | However, Recipient's obligations under this Agreement and any licenses 237 | granted by Recipient relating to the Program shall continue and survive. 238 | 239 | Everyone is permitted to copy and distribute copies of this Agreement, 240 | but in order to avoid inconsistency the Agreement is copyrighted and 241 | may only be modified in the following manner. The Agreement Steward 242 | reserves the right to publish new versions (including revisions) of 243 | this Agreement from time to time. No one other than the Agreement 244 | Steward has the right to modify this Agreement. The Eclipse Foundation 245 | is the initial Agreement Steward. The Eclipse Foundation may assign the 246 | responsibility to serve as the Agreement Steward to a suitable separate 247 | entity. Each new version of the Agreement will be given a distinguishing 248 | version number. The Program (including Contributions) may always be 249 | Distributed subject to the version of the Agreement under which it was 250 | received. In addition, after a new version of the Agreement is published, 251 | Contributor may elect to Distribute the Program (including its 252 | Contributions) under the new version. 253 | 254 | Except as expressly stated in Sections 2(a) and 2(b) above, Recipient 255 | receives no rights or licenses to the intellectual property of any 256 | Contributor under this Agreement, whether expressly, by implication, 257 | estoppel or otherwise. All rights in the Program not expressly granted 258 | under this Agreement are reserved. Nothing in this Agreement is intended 259 | to be enforceable by any entity that is not a Contributor or Recipient. 260 | No third-party beneficiary rights are created under this Agreement. 261 | 262 | Exhibit A - Form of Secondary Licenses Notice 263 | 264 | "This Source Code may also be made available under the following 265 | Secondary Licenses when the conditions for such availability set forth 266 | in the Eclipse Public License, v. 2.0 are satisfied: {name license(s), 267 | version(s), and exceptions or additional permissions here}." 268 | 269 | Simply including a copy of this Agreement, including this Exhibit A 270 | is not sufficient to license the Source Code under Secondary Licenses. 271 | 272 | If it is not possible or desirable to put the notice in a particular 273 | file, then You may include the notice in a location (such as a LICENSE 274 | file in a relevant directory) where a recipient would be likely to 275 | look for such a notice. 276 | 277 | You may add additional accurate notices of copyright ownership. 278 | --------------------------------------------------------------------------------