Added SSH key and script directory.

This commit is contained in:
yohan 2020-03-27 21:03:30 +01:00
parent 5439181b60
commit b85587a16d
3 changed files with 11 additions and 2 deletions

1
config Normal file
View File

@ -0,0 +1 @@
StrictHostKeyChecking accept-new

View File

@ -8,3 +8,7 @@ services:
network_mode: "host"
volumes:
- ./crontab.yaml:/root/crontab.yaml:Z
- ./id_rsa:/root/.ssh/id_rsa:Z
- ./id_rsa.pub:/root/.ssh/id_rsa.pub:Z
- ./config:/root/.ssh/config:Z
- ./scripts:/root/scripts:Z

View File

@ -11,10 +11,14 @@ then
exit 1
fi
fi
openssl enc -aes-256-cbc -d -in ~/secrets.tar.gz.enc | sudo tar -zxv --strip 2 secrets/docker-cron-global-stack${HOST}${INSTANCE}/crontab.yaml \
openssl enc -aes-256-cbc -d -in ~/secrets.tar.gz.enc \
| sudo tar -zxv --strip 2 secrets/docker-cron-global-stack${HOST}${INSTANCE}/crontab.yaml \
secrets/docker-cron-global-stack${HOST}${INSTANCE}/scripts \
secrets/bootstrap/id_rsa secrets/bootstrap/id_rsa.pub \
|| { echo "Could not extract from secrets archive, exiting."; rm -f ~/secrets.tar.gz.enc; exit 1; }
sudo chown root. crontab.yaml
sudo chown root. crontab.yaml id_rsa id_rsa.pub config scripts
sudo chmod 644 crontab.yaml
sudo chmod 400 id_rsa id_rsa.pub config
unset VERSION_CRON
export VERSION_CRON=$(git ls-remote https://git.scimetis.net/yohan/docker-cron.git| head -1 | cut -f 1|cut -c -10)