You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

24 lines
549 B
Bash

#!/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