Skip to content

Commit

Permalink
Use Restart=always for the Teleport systemd service (#41583)
Browse files Browse the repository at this point in the history
  • Loading branch information
espadolini committed May 15, 2024
1 parent 3bc2861 commit beb01e8
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion examples/systemd/fips/teleport.service
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ After=network.target

[Service]
Type=simple
Restart=on-failure
Restart=always
RestartSec=5
EnvironmentFile=-/etc/default/teleport
ExecStart=/usr/local/bin/teleport start --fips --pid-file=/run/teleport.pid
Expand Down
2 changes: 1 addition & 1 deletion examples/systemd/production/auth/teleport.service
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ After=network.target

[Service]
Type=simple
Restart=on-failure
Restart=always
RestartSec=5
# Set the nodes roles with the `--roles`
# In most production environments you will not
Expand Down
2 changes: 1 addition & 1 deletion examples/systemd/production/node/teleport.service
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ After=network.target

[Service]
Type=simple
Restart=on-failure
Restart=always
RestartSec=5
# Set the nodes roles with the `--roles`
# In most production environments you will not
Expand Down
2 changes: 1 addition & 1 deletion examples/systemd/production/proxy/teleport.service
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ After=network.target

[Service]
Type=simple
Restart=on-failure
Restart=always
RestartSec=5
# Set the nodes roles with the `--roles`
# In most production environments you will not
Expand Down
2 changes: 1 addition & 1 deletion examples/systemd/teleport.service
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ After=network.target

[Service]
Type=simple
Restart=on-failure
Restart=always
RestartSec=5
EnvironmentFile=-/etc/default/teleport
ExecStart=/usr/local/bin/teleport start --pid-file=/run/teleport.pid
Expand Down
2 changes: 1 addition & 1 deletion lib/config/systemd.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ After=network.target
[Service]
Type=simple
Restart=on-failure
Restart=always
RestartSec=5
EnvironmentFile=-{{ .EnvironmentFile }}
ExecStart={{ .TeleportInstallationFile }} start --pid-file={{ .PIDFile }}
Expand Down
2 changes: 1 addition & 1 deletion lib/config/testdata/TestWriteSystemdUnitFile.golden
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ After=network.target

[Service]
Type=simple
Restart=on-failure
Restart=always
RestartSec=5
EnvironmentFile=-/custom/env/dir/teleport
ExecStart=/custom/install/dir/teleport start --pid-file=/custom/pid/dir/teleport.pid
Expand Down

0 comments on commit beb01e8

Please sign in to comment.