#!/bin/sh
# Forced SSH command: no arguments, paths, forwarding or shell from the client.
set -eu
case "${SSH_ORIGINAL_COMMAND:-}" in
    'import-publications dry-run') exec sudo -n /usr/local/sbin/miem-publication-import dry-run ;;
    'import-publications apply') exec sudo -n /usr/local/sbin/miem-publication-import apply ;;
    *) printf '%s\n' 'Allowed: import-publications dry-run | import-publications apply' >&2; exit 1 ;;
esac
