#!/usr/bin/env bash set -euo pipefail [[ $EUID == 0 ]] || { echo 'Run as root' >&2; exit 1; } # `pct exec` omits /usr/local/bin, where Node and pnpm live. export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin runuser -u shellbook -- bash -c 'cd /opt/shellbook; git pull --ff-only; pnpm install --frozen-lockfile; pnpm build' systemctl restart shellbook systemctl --no-pager status shellbook