#!/bin/sh
# Shared Hub registration entrypoint for appliance installations.
if [ "$#" != 1 ] || [ "$1" != connect ]; then
    echo 'Usage: turnkey connect' >&2
    exit 2
fi
if [ "$(id -u)" != 0 ]; then
    echo 'Run: sudo turnkey connect' >&2
    exit 1
fi
exec /usr/lib/inithooks/bin/hubservices.py --relink
