]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blob - src/initscripts/packages/amazon-ssm-agent
aws-setup: Remove some excessive whitespace
[people/pmueller/ipfire-2.x.git] / src / initscripts / packages / amazon-ssm-agent
1 #!/bin/sh
2 ########################################################################
3 # Begin $rc_base/init.d/amazon-ssm-agent
4 ########################################################################
5
6 . /etc/sysconfig/rc
7 . ${rc_functions}
8
9 case "${1}" in
10 start)
11 # Do not launch the agent when we are not running on EC2
12 if ! running_on_ec2; then
13 exit 0
14 fi
15
16 boot_mesg "Starting Amazon SSM Agent..."
17 /usr/bin/amazon-ssm-agent &>/dev/null &
18 evaluate_retval
19 ;;
20
21 stop)
22 boot_mesg "Stopping Amazon SSM Agent..."
23 killproc /usr/bin/amazon-ssm-agent
24 ;;
25
26 restart)
27 ${0} stop
28 sleep 1
29 ${0} start
30 ;;
31
32 status)
33 statusproc /usr/bin/amazon-ssm-agent
34 ;;
35
36 *)
37 echo "Usage: ${0} {start|stop|restart|status}"
38 exit 1
39 ;;
40 esac
41
42 # End $rc_base/init.d/amazon-ssm-agent