Skip to content

Commit

Permalink
Add teleport_opts for flags not available in config file
Browse files Browse the repository at this point in the history
  • Loading branch information
woohgit committed Nov 2, 2017
1 parent c7d1a5a commit 246ea7d
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion templates/teleport.service.j2
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ After=network.target
[Service]
Type=simple
Restart=always
ExecStart=/usr/local/bin/teleport start --config={{ teleport_config_path }}
ExecStart=/usr/local/bin/teleport start --config={{ teleport_config_path }} {{ teleport_opts | default('') }}

[Install]
WantedBy=multi-user.target
9 changes: 5 additions & 4 deletions templates/teleport.sysvinit.j2
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ test -x $TELEPORT_BIN || exit 5

TELEPORT_PIDFILE={{ teleport_pidfile }}

TELEPORT_OPTS="start --config={{ teleport_config_path }}"
TELEPORT_OPTS="start --config={{ teleport_config_path }} {{ teleport_opts | default('') }}"

. /etc/rc.status

Expand Down Expand Up @@ -67,10 +67,11 @@ case "$1" in
else
soft_stop
fi

# Remember status and be verbose
rc_status -v
;;

soft-stop)
## Stop the listener daemon process with killproc(8) and if this
## fails set echo the echo return value.
Expand All @@ -87,15 +88,15 @@ case "$1" in
rc_status -v
;;
try-restart)
## Stop the service and if this succeeds (i.e. the
## Stop the service and if this succeeds (i.e. the
## service was running before), start it again.
$0 status >/dev/null && $0 restart

# Remember status and be quiet
rc_status
;;
restart)
## Stop the service without closing live connections
## Stop the service without closing live connections
## and start it again regardless of whether it was
## running or not
$0 soft-stop
Expand Down
4 changes: 2 additions & 2 deletions templates/teleport.upstart.j2
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ author "Adam Papai <wooh@wooh.hu>"
start on (started networking)
stop on runlevel [016]

exec /usr/local/bin/teleport start --config={{ teleport_config_path }}
exec /usr/local/bin/teleport start --config={{ teleport_config_path }} {{ teleport_opts | default('') }}

respawn
respawn

0 comments on commit 246ea7d

Please sign in to comment.