mirror of
https://git.freebsd.org/ports.git
synced 2025-05-17 09:33:11 -04:00
The SSM Agent can be used to effect a login shell; set $PATH appropriately for interactive logins. PR: 260476 Reported by: amendlik at gmail Sponsored by: https://www.patreon.com/cperciva
26 lines
625 B
Bash
26 lines
625 B
Bash
#!/bin/sh
|
|
|
|
# PROVIDE: amazon-ssm-agent
|
|
# REQUIRE: LOGIN
|
|
# KEYWORD: shutdown
|
|
#
|
|
# Add the following lines to /etc/rc.conf.local or /etc/rc.conf
|
|
# to enable this service:
|
|
#
|
|
# amazon_ssm_agent_enable: Set to YES to enable the Amazon SSM Agent
|
|
|
|
. /etc/rc.subr
|
|
|
|
name="amazon_ssm_agent"
|
|
rcvar=amazon_ssm_agent_enable
|
|
|
|
load_rc_config $name
|
|
|
|
: ${amazon_ssm_agent_enable="NO"}
|
|
: ${amazon_ssm_agent_env="PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:/home/ssm-user/bin"}
|
|
|
|
pidfile="/var/run/${name}.pid"
|
|
command="/usr/sbin/daemon"
|
|
command_args="-f -P ${pidfile} %%PREFIX%%/sbin/amazon-ssm-agent"
|
|
|
|
run_rc_command "$1"
|