Files
pxe_boot_alma/work/KickStart/cfg/probe-config/L980-credentials.sh
T
andersenandClaude Fable 5 6d398b826a refactor: move tree under homelab/, add alma10 hardening and kickstart docs
- restructure boot/kickstarts/scripts/docs into homelab/
- docs: alma9->10 breaking changes, CIS hardening, kickstart changes
- add find_cron_entries.sh helper and codex running memory notes

Co-Authored-By: Claude Fable 5 <[email protected]>
2026-07-06 22:35:07 -04:00

57 lines
1.7 KiB
Bash

#!/bin/bash
#
# Setup customer aws user on probe
#
if test -t 0; then
Warn() { echo "$*" >> /dev/stderr; }
Continue() { echo -n; }
while getopts "c:p:i:" optionName; do
case "$optionName" in
c) CUST="$OPTARG";;
p) PROBE="$OPTARG";;
i) NATIP="$OPTARG";;
esac
done
KADDR="$PROBE"
fi
if [ -z "$CUST" ]; then
Warn "Customer required for aws key setup"
Warn "$0 -c <cust> -p <probe> -i <natip>"
else
echo "Setting up $CUST aws user:"
echo $SSH "sudo -u wia /opt/iglass/bin/mkAwsUser.sh -c -u $CUST"
# This can be run any time but the customer has to be in the list of iGlass customers for it to do anything
# echo $SSH "sudo -u noc /opt/iglass/bin/awsGenerateLifecycle.pl --push"
if false; then
if [ -z "$PROBE" ]; then
Warn "Probe name required for sync keys"
elif [ -z "$KADDR" ]; then
Warn "Probe kickstart IP required for sync keys"
else
echo
echo "root@monolith:"
echo "cd /home/KickStart/iGlassCA"
echo "NATIP="
echo "/opt/iglass/bin/mkClientCert.sh -h $PROBE -a $NATIP"
echo "scp CA/iGlassCA.crt.pem clients/${PROBE}-${NATIP}.key.pem clients/${PROBE}-${NATIP}.crt.pem noc@$KADDR:/opt/iglass/conf/pki/"
echo
echo "noc@$KADDR:"
echo "cd /opt/iglass/conf/pki/"
echo "ln -s ${PROBE}-${NATIP}.crt.pem $PROBE.crt"
echo "ln -s ${PROBE}-${NATIP}.crt.pem probe.crt"
echo "ln -s ${PROBE}-${NATIP}.key.pem $PROBE.key"
echo "ln -s ${PROBE}-${NATIP}.key.pem probe.key"
echo "ln -sf iGlassCA.crt.pem iGlassCA.crt"
echo "chmod 600 *"
fi
fi
fi
Continue