#!/bin/sh
set -e

mkdir -p /opt/oak1-camera-playground/app/logs
mkdir -p /opt/oak1-camera-playground/app/data

systemctl daemon-reload
systemctl enable oak1-camera-playground.service
systemctl restart oak1-camera-playground.service

echo ""
echo "oak1-camera-playground installed and started as a systemd service."
echo "  Status:  systemctl status oak1-camera-playground"
echo "  Logs:    journalctl -u oak1-camera-playground -f"
echo "  Web UI:  http://localhost:8000"
echo ""

exit 0
