Files
cis/script/host/zfs/composition-sync/setupCompositionRunningHost.sh
T
2026-05-02 22:36:16 +02:00

20 lines
607 B
Bash
Executable File

#!/bin/bash
[ "$(id -u)" != "0" ] \
&& sudo "${0}" \
&& exit 0
source /cis/core/base.module.sh
echo "Setup the user and permission to enable syncing compositions of this host ... " \
&& "${CIS[COREROOT]:?"Missing CORE_SCRIPTS"}addNormalUser.sh" composition-sync \
&& echo \
&& "${CIS[COREROOT]:?"Missing CORE_SCRIPTS"}defineAuthorizedKeysOfUser.sh" "${CIS[DOMAINDEFINITIONS]}" composition-sync \
&& echo \
&& "${CIS[COREROOT]:?"Missing CORE_SCRIPTS"}ensureUsageOfDefinitions.sh" "${CIS[DOMAINDEFINITIONS]}" /etc/sudoers.d/allow-composition-sync-send \
&& exit 0
exit 1