Skip to content

Commit 1e5d5b8

Browse files
Merge pull request #17 from utilitywarehouse/systemd-infinite-restarts
Allow the systemd services to restart endlessly
2 parents 400f233 + d68da79 commit 1e5d5b8

File tree

3 files changed

+3
-0
lines changed

3 files changed

+3
-0
lines changed

terraform/resources/ssh-key-agent-docker.service

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ After=docker.service
44
Requires=docker.service
55
[Service]
66
Restart=on-failure
7+
RestartSec=10
78
ExecStartPre=-/usr/bin/mkdir -p /home/core/.ssh
89
ExecStartPre=-/usr/bin/touch /home/core/.ssh/authorized_keys
910
ExecStartPre=-/usr/bin/chown -R "core":"core" /home/core/.ssh

terraform/resources/ssh-key-agent-download.service

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ Before=ssh-key-agent.service
77
[Service]
88
Type=oneshot
99
Restart=on-failure
10+
RestartSec=10
1011
ExecStart=-/usr/bin/wget -N -q -O "/opt/bin/ssh-key-agent" "${source}"
1112
ExecStart=-/usr/bin/chmod 755 /opt/bin/ssh-key-agent
1213
ExecStartPost=/bin/systemctl disable ssh-key-agent-download.service

terraform/resources/ssh-key-agent.service

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ After=network-online.target
44
Wants=network-online.target
55
[Service]
66
Restart=on-failure
7+
RestartSec=10
78
ExecStartPre=-/usr/bin/mkdir -p /home/core/.ssh
89
ExecStartPre=-/usr/bin/touch /home/core/.ssh/authorized_keys
910
ExecStartPre=-/usr/bin/chown -R "core":"core" /home/core/.ssh

0 commit comments

Comments
 (0)