#!/bin/sh
# The installer key, if one was given in the wizard: joins the NAS approved.
VAR="/var/packages/NugezzaWorker/var"
mkdir -p "$VAR"
case "$wizard_key" in
  nze_*) printf '{"server":"https://nugezza.com","key":"%s"}' "$wizard_key" > "$VAR/enroll.json"; chmod 600 "$VAR/enroll.json" ;;
esac
exit 0
