#!/bin/bash # import trusted fingerprints mkdir "$HOME/.ssh" echo "$SSH_HOST_KEY" > "$HOME/.ssh/known_hosts" # use a custom ssh key for git export GIT_SSH_COMMAND="ssh -i ""$SSH_PRIVATE_KEY""" while :; do # check if the git repository already got cloned if [ -d .git ]; then # update the git repository git pull else # no repository found; do an initial clone git clone "$REPOSITORY" . fi # run the actual iptables script pwsh -File /expose_forwards.ps1 -Stacks ./stacks sleep 60 done