Skip to content

Commit

Permalink
[v15] Configure the systemd unit file RestartSec value (#40229)
Browse files Browse the repository at this point in the history
* Set RestartSec=5

* Update examples
  • Loading branch information
bernardjkim authored Apr 5, 2024
1 parent c735b00 commit 5c9a3a2
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions examples/systemd/fips/teleport.service
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ After=network.target
[Service]
Type=simple
Restart=on-failure
RestartSec=5
EnvironmentFile=-/etc/default/teleport
ExecStart=/usr/local/bin/teleport start --config /etc/teleport.yaml --fips --pid-file=/run/teleport.pid
# systemd before 239 needs an absolute path
Expand Down
1 change: 1 addition & 0 deletions examples/systemd/production/auth/teleport.service
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ After=network.target
[Service]
Type=simple
Restart=on-failure
RestartSec=5
# Set the nodes roles with the `--roles`
# In most production environments you will not
# want to run all three roles on a single host
Expand Down
1 change: 1 addition & 0 deletions examples/systemd/production/node/teleport.service
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ After=network.target
[Service]
Type=simple
Restart=on-failure
RestartSec=5
# Set the nodes roles with the `--roles`
# In most production environments you will not
# want to run all three roles on a single host
Expand Down
1 change: 1 addition & 0 deletions examples/systemd/production/proxy/teleport.service
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ After=network.target
[Service]
Type=simple
Restart=on-failure
RestartSec=5
# Set the nodes roles with the `--roles`
# In most production environments you will not
# want to run all three roles on a single host
Expand Down
1 change: 1 addition & 0 deletions examples/systemd/teleport.service
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ After=network.target
[Service]
Type=simple
Restart=on-failure
RestartSec=5
EnvironmentFile=-/etc/default/teleport
ExecStart=/usr/local/bin/teleport start --config /etc/teleport.yaml --pid-file=/run/teleport.pid
# systemd before 239 needs an absolute path
Expand Down
1 change: 1 addition & 0 deletions lib/config/systemd.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ After=network.target
[Service]
Type=simple
Restart=on-failure
RestartSec=5
EnvironmentFile=-{{ .EnvironmentFile }}
ExecStart={{ .TeleportInstallationFile }} start --config {{ .TeleportConfigPath }} --pid-file={{ .PIDFile }}
# systemd before 239 needs an absolute path
Expand Down
1 change: 1 addition & 0 deletions lib/config/testdata/TestWriteSystemdUnitFile.golden
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ After=network.target
[Service]
Type=simple
Restart=on-failure
RestartSec=5
EnvironmentFile=-/custom/env/dir/teleport
ExecStart=/custom/install/dir/teleport start --config /etc/teleport.yaml --pid-file=/custom/pid/dir/teleport.pid
# systemd before 239 needs an absolute path
Expand Down

0 comments on commit 5c9a3a2

Please sign in to comment.