#!/usr/bin/env bash set -euo pipefail checkout=/opt/akyldash/current if [[ $# -ne 0 || $EUID -ne 0 || ! -d $checkout || -L $checkout || $(stat -c %U "$checkout") != root ]]; then echo 'Refusing verification: the approved root-owned checkout is unavailable.' >&2 exit 1 fi unsafe=$(find "$checkout" -xdev \( ! -user root -o -perm /022 \) -print -quit) if [[ -n $unsafe ]]; then echo 'Refusing verification: the checkout contains a writable or non-root-owned path.' >&2 exit 1 fi exec /bin/bash "$checkout/infra/bootstrap/verify.sh" --remote