#!/bin/sh # /usr/local/bin/kernelwatch — admin CLI wrapper. Runs as the service user so # the database stays owned by it. set -e if [ "$(id -u)" = 0 ]; then exec runuser -u kernelwatch -- env KERNELWATCH_CONFIG=/etc/kernelwatch/server.toml \ /usr/bin/python3 -I /opt/kernelwatch/kernelwatch-server "$@" fi if [ "$(id -un)" = kernelwatch ]; then exec env KERNELWATCH_CONFIG=/etc/kernelwatch/server.toml \ /usr/bin/python3 -I /opt/kernelwatch/kernelwatch-server "$@" fi echo "kernelwatch: run with sudo" >&2 exit 1