summaryrefslogtreecommitdiffstats
path: root/retiolum/scripts/github_hosts_sync/README
diff options
context:
space:
mode:
authormakefu <github@syntax-fehler.de>2014-02-20 18:50:45 +0100
committermakefu <github@syntax-fehler.de>2014-02-20 18:50:45 +0100
commit3843ad66568d099e2b0bb2f7158753066b69c965 (patch)
tree299f7e38776ea8b3f8114979170e1f88fbf09fce /retiolum/scripts/github_hosts_sync/README
parentf46851de1af7c044471523c40e0fe88579b8a997 (diff)
parent3ed35ed3e1efa4f741c0913efc90c9c36eb32d01 (diff)
Merge branch 'master' of ssh://github.com/krebscode/painload
Diffstat (limited to 'retiolum/scripts/github_hosts_sync/README')
-rw-r--r--retiolum/scripts/github_hosts_sync/README26
1 files changed, 26 insertions, 0 deletions
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
+
+