noVNC/snap/hooks/configure

13 lines
301 B
Bash

#!/bin/sh -e
listen_port="$(snapctl get novncsvc.listen_port)"
vnc_host_port="$(snapctl get novncsvc.vnc_host_port)"
# Validate listen_port
if ! expr "$listen_port" : '^[0-9]\+$' > /dev/null; then
echo "\"$listen_port\" is not a valid port number" >&2
return 1
fi
snapctl restart novncsvc