mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-24 18:03:06 +02:00
amazon-ssm-agent: New package
AWS Systems Manager Agent (SSM Agent) is Amazon software that can be installed and configured on an Amazon EC2 instance, an on-premises server, or a virtual machine (VM). SSM Agent makes it possible for Systems Manager to update, manage, and configure these resources. The agent processes requests from the Systems Manager service in the AWS Cloud, and then runs them as specified in the request. SSM Agent then sends status and execution information back to the Systems Manager service by using the Amazon Message Delivery Service. Signed-off-by: Michael Tremer <michael.tremer@ipfire.org> Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
This commit is contained in:
committed by
Arne Fitzenreiter
parent
590f879b34
commit
44cc9a3d57
42
src/initscripts/packages/amazon-ssm-agent
Normal file
42
src/initscripts/packages/amazon-ssm-agent
Normal file
@@ -0,0 +1,42 @@
|
||||
#!/bin/sh
|
||||
########################################################################
|
||||
# Begin $rc_base/init.d/amazon-ssm-agent
|
||||
########################################################################
|
||||
|
||||
. /etc/sysconfig/rc
|
||||
. ${rc_functions}
|
||||
|
||||
case "${1}" in
|
||||
start)
|
||||
# Do not launch the agent when we are not running on EC2
|
||||
if ! running_on_ec2; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
boot_mesg "Starting Amazon SSM Agent..."
|
||||
/usr/bin/amazon-ssm-agent &>/dev/null &
|
||||
evaluate_retval
|
||||
;;
|
||||
|
||||
stop)
|
||||
boot_mesg "Stopping Amazon SSM Agent..."
|
||||
killproc /usr/bin/amazon-ssm-agent
|
||||
;;
|
||||
|
||||
restart)
|
||||
${0} stop
|
||||
sleep 1
|
||||
${0} start
|
||||
;;
|
||||
|
||||
status)
|
||||
statusproc /usr/bin/amazon-ssm-agent
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "Usage: ${0} {start|stop|restart|status}"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
# End $rc_base/init.d/amazon-ssm-agent
|
||||
36
src/paks/amazon-ssm-agent/install.sh
Normal file
36
src/paks/amazon-ssm-agent/install.sh
Normal file
@@ -0,0 +1,36 @@
|
||||
#!/bin/bash
|
||||
############################################################################
|
||||
# #
|
||||
# This file is part of the IPFire Firewall. #
|
||||
# #
|
||||
# IPFire is free software; you can redistribute it and/or modify #
|
||||
# it under the terms of the GNU General Public License as published by #
|
||||
# the Free Software Foundation; either version 2 of the License, or #
|
||||
# (at your option) any later version. #
|
||||
# #
|
||||
# IPFire is distributed in the hope that it will be useful, #
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of #
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
|
||||
# GNU General Public License for more details. #
|
||||
# #
|
||||
# You should have received a copy of the GNU General Public License #
|
||||
# along with IPFire; if not, write to the Free Software #
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #
|
||||
# #
|
||||
# Copyright (C) 2007 IPFire-Team <info@ipfire.org>. #
|
||||
# #
|
||||
############################################################################
|
||||
#
|
||||
. /opt/pakfire/lib/functions.sh
|
||||
|
||||
extract_files
|
||||
restore_backup ${NAME}
|
||||
|
||||
start_service ${NAME}
|
||||
|
||||
# Enable autostart
|
||||
ln -sf ../init.d/amazon-ssm-agent /etc/rc.d/rc0.d/K10amazon-ssm-agent
|
||||
ln -sf ../init.d/amazon-ssm-agent /etc/rc.d/rc3.d/S41amazon-ssm-agent
|
||||
ln -sf ../init.d/amazon-ssm-agent /etc/rc.d/rc6.d/K10amazon-ssm-agent
|
||||
|
||||
exit 0
|
||||
36
src/paks/amazon-ssm-agent/uninstall.sh
Normal file
36
src/paks/amazon-ssm-agent/uninstall.sh
Normal file
@@ -0,0 +1,36 @@
|
||||
#!/bin/bash
|
||||
############################################################################
|
||||
# #
|
||||
# This file is part of the IPFire Firewall. #
|
||||
# #
|
||||
# IPFire is free software; you can redistribute it and/or modify #
|
||||
# it under the terms of the GNU General Public License as published by #
|
||||
# the Free Software Foundation; either version 2 of the License, or #
|
||||
# (at your option) any later version. #
|
||||
# #
|
||||
# IPFire is distributed in the hope that it will be useful, #
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of #
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
|
||||
# GNU General Public License for more details. #
|
||||
# #
|
||||
# You should have received a copy of the GNU General Public License #
|
||||
# along with IPFire; if not, write to the Free Software #
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #
|
||||
# #
|
||||
# Copyright (C) 2007 IPFire-Team <info@ipfire.org>. #
|
||||
# #
|
||||
############################################################################
|
||||
#
|
||||
. /opt/pakfire/lib/functions.sh
|
||||
|
||||
extract_backup_includes
|
||||
|
||||
stop_service ${NAME}
|
||||
|
||||
make_backup ${NAME}
|
||||
|
||||
remove_files
|
||||
|
||||
rm -rfv /etc/rc.d/rc*.d/*amazon-ssm-agent
|
||||
|
||||
exit 0
|
||||
26
src/paks/amazon-ssm-agent/update.sh
Normal file
26
src/paks/amazon-ssm-agent/update.sh
Normal file
@@ -0,0 +1,26 @@
|
||||
#!/bin/bash
|
||||
############################################################################
|
||||
# #
|
||||
# This file is part of the IPFire Firewall. #
|
||||
# #
|
||||
# IPFire is free software; you can redistribute it and/or modify #
|
||||
# it under the terms of the GNU General Public License as published by #
|
||||
# the Free Software Foundation; either version 2 of the License, or #
|
||||
# (at your option) any later version. #
|
||||
# #
|
||||
# IPFire is distributed in the hope that it will be useful, #
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of #
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
|
||||
# GNU General Public License for more details. #
|
||||
# #
|
||||
# You should have received a copy of the GNU General Public License #
|
||||
# along with IPFire; if not, write to the Free Software #
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #
|
||||
# #
|
||||
# Copyright (C) 2007 IPFire-Team <info@ipfire.org>. #
|
||||
# #
|
||||
############################################################################
|
||||
#
|
||||
. /opt/pakfire/lib/functions.sh
|
||||
./uninstall.sh
|
||||
./install.sh
|
||||
Reference in New Issue
Block a user