From 1cd304b57bc2ad725fa074d4537c2bdefa821085 Mon Sep 17 00:00:00 2001 From: tv Date: Wed, 19 Feb 2014 14:23:13 +0100 Subject: hosts-sync: add #?-doc --- retiolum/scripts/github_hosts_sync/README | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 retiolum/scripts/github_hosts_sync/README diff --git a/retiolum/scripts/github_hosts_sync/README b/retiolum/scripts/github_hosts_sync/README new file mode 100644 index 00000000..12aa8dfe --- /dev/null +++ b/retiolum/scripts/github_hosts_sync/README @@ -0,0 +1,26 @@ +#? /bin/sh + +useradd -m hosts-sync +cp systemd/hosts-sync.service /etc/systemd/system/ +cp systemd/hosts-sync.conf /etc/conf.d/ + +sudo -u hosts-sync -i ssh-keygen +add /home/hosts-sync/.ssh/id_rsa.pub as github/krebscode/hosts deploy key +sudo -u hosts-sync -i git clone git@github.com:krebscode/hosts.git ~hosts-sync/hosts # to accept the remote key (and have an initial copy) + +sudo -u hosts-sync -i git config --global user.email hosts-sync@ire.retiolum +sudo -u hosts-sync -i git config --global user.name hosts-sync +sudo -u hosts-sync -i git config --global push.default simple + +systemctl start hosts-sync +systemctl enable hosts-sync + +TODO firewall setup + +#? /bin/sh (update service) +git pull +cp retiolum/scripts/github_hosts_sync/systemd/hosts-sync.service /etc/systemd/system/ +systemctl daemon-reload +systemctl restart hosts-sync + + -- cgit v1.2.3