You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Add a simple revocation service that runs on shutdown/reboot and if
# the node is no longer allocated, certbot revoke .
#
cat <<'EOF' | $SUDO tee /etc/systemd/system/tbhook.service
[Unit]
Description=Testbed Hook Service
After=testbed.service
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/bin/sh -c "/usr/local/etc/emulab/tmcc.bin -s boss status > /var/emulab/boot/tmcc/status"
ExecStop=/bin/sh -c '. /var/emulab/boot/tmcc/status ; if [ -z "$ALLOCATED" ]; then echo "No info from tmcd, skipping" ; exit 0 ; fi ; OLD="$ALLOCATED" ; /usr/local/etc/emulab/tmcc.bin -s boss status > /tmp/allocated ; . /tmp/allocated ; if [ -z "$ALLOCATED" ]; then echo "No updated info from tmcd, skipping" ; exit 0 ; fi ; if [ "$OLD" = "$ALLOCATED" ]; then exit 0 ; fi ; echo Revoking "letsencrypt certificate"; certbot revoke --cert-path /etc/letsencrypt/live/`cat /var/emulab/boot/nodeid`.`cat /var/emulab/boot/mydomain`/fullchain.pem -n ; exit 0'