diff --git a/extra/00-gen-cert b/extra/00-gen-cert index 8c92f63..0b0459e 100755 --- a/extra/00-gen-cert +++ b/extra/00-gen-cert @@ -18,4 +18,4 @@ if [ ! -f "$SNAP_COMMON/certificate.pem" ]; then snapctl set tcp.pk="$SNAP_COMMON/privkey.pem" snapctl set tcp.auth=false snapctl set tcp.authkey="$(cat /proc/sys/kernel/random/uuid)" -fi +fi \ No newline at end of file diff --git a/snap/hooks/configure b/snap/hooks/configure index 10ad71f..e936424 100755 --- a/snap/hooks/configure +++ b/snap/hooks/configure @@ -47,7 +47,7 @@ if tcp_ssl == "true" and tcp_pk == "": exit(1) if tcp_ssl == "true" and tcp_pk != "" and not os.path.exists(tcp_pk): - print("Given tcp.pk - no such path '{0}'".format(tcp_pk)) + print("Given tcp.pk does not exist at '{0}'".format(tcp_pk)) exit(1) if tcp_ssl == "true" and tcp_cert == "": @@ -55,7 +55,7 @@ if tcp_ssl == "true" and tcp_cert == "": exit(1) if tcp_ssl == "true" and tcp_cert != "" and not os.path.exists(tcp_cert): - print("Given tcp.cert - no such path '{0}'".format(tcp_cert)) + print("Given tcp.cert does not exist at '{0}'".format(tcp_cert)) exit(1) if tcp_auth != "true" and tcp_auth != "false": diff --git a/snap/hooks/install b/snap/hooks/install index e687566..bac71e7 100755 --- a/snap/hooks/install +++ b/snap/hooks/install @@ -1,4 +1,7 @@ #!/bin/sh set -e -snapctl set tcp.port=27015 tcp.relay=true serial.autodiscover=true serial.port=/dev/ttyAMA0 logging.type=info logging.output=stream \ No newline at end of file +snapctl set tcp.port=27015 tcp.relay=true serial.autodiscover=true serial.port=/dev/ttyAMA0 logging.type=info logging.output=stream tcp.ssl=false tcp.auth=false + +# Generate certificate +sh $SNAP/00-gen-cert \ No newline at end of file diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml index 2f524b2..9409b29 100644 --- a/snap/snapcraft.yaml +++ b/snap/snapcraft.yaml @@ -1,5 +1,5 @@ name: velbus-tcp -version: '0.0.6' +version: '1.0.0' summary: Python application that bridges a Velbus installation with TCP description: | Python application that bridges a Velbus installation with TCP. @@ -17,6 +17,7 @@ parts: src: plugin: dump source: https://github.com/velbus/python-velbustcp.git + source-tag: 1.0.0 stage-packages: [openssl] extra: