diff options
author | tv <tv@nomic.retiolum> | 2014-02-19 13:48:03 +0100 |
---|---|---|
committer | tv <tv@nomic.retiolum> | 2014-02-19 13:49:38 +0100 |
commit | 2ce39803bf71bd49503ee8a6d81d73091883b465 (patch) | |
tree | 934dd40b3c592297bcab6a355dbfa2e1cb03f118 | |
parent | bcc7aefa1c6fb999992c07327e1df9456814a283 (diff) |
hosts sync: add systemd files
-rwxr-xr-x | retiolum/scripts/github_hosts_sync/index | 2 | ||||
-rw-r--r-- | retiolum/scripts/github_hosts_sync/systemd/hosts-sync.conf | 1 | ||||
-rw-r--r-- | retiolum/scripts/github_hosts_sync/systemd/hosts-sync.service | 15 |
3 files changed, 17 insertions, 1 deletions
diff --git a/retiolum/scripts/github_hosts_sync/index b/retiolum/scripts/github_hosts_sync/index index 31cbc763..7b444ea4 100755 --- a/retiolum/scripts/github_hosts_sync/index +++ b/retiolum/scripts/github_hosts_sync/index @@ -2,7 +2,7 @@ # TODO do_work should retry until success set -euf -port=1028 +port=${port-1028} local_painload=/krebs; remote_painload="git@github.com:krebscode/painload.git" local_hosts=/tmp/hosts; remote_hosts="git@github.com:krebscode/hosts.git" diff --git a/retiolum/scripts/github_hosts_sync/systemd/hosts-sync.conf b/retiolum/scripts/github_hosts_sync/systemd/hosts-sync.conf new file mode 100644 index 00000000..606f17b4 --- /dev/null +++ b/retiolum/scripts/github_hosts_sync/systemd/hosts-sync.conf @@ -0,0 +1 @@ +port=1028 diff --git a/retiolum/scripts/github_hosts_sync/systemd/hosts-sync.service b/retiolum/scripts/github_hosts_sync/systemd/hosts-sync.service new file mode 100644 index 00000000..60d4799f --- /dev/null +++ b/retiolum/scripts/github_hosts_sync/systemd/hosts-sync.service @@ -0,0 +1,15 @@ +[Unit] +Description=retiolum github hosts sync +After=network.target + +[Service] +EnvironmentFile=/etc/conf.d/retiolum-github-hosts-sync.conf +ExecStart=/krebs/retiolum/scripts/github_hosts_sync/index +KillMode=process +User=hosts-sync +Group=hosts-sync +Restart=yes + +[Install] +WantedBy=multi-user.target + |