From f0bbd9d1e94e7ea675e6774444411582fbdc80bf Mon Sep 17 00:00:00 2001 From: yozhao101 <56170650+yozhao101@users.noreply.github.com> Date: Fri, 7 May 2021 13:37:09 -0700 Subject: [PATCH] [Monit] Install the unit of generate_monit_config.service. (#7558) Signed-off-by: Yong Zhao yozhao@microsoft.com Why I did it The service file generate_monit_config.service is used to generate the Monit configuration file from template. I also should install this service file and enable it. How I did it I appended this service file name at the end of /etc/sonic/generated_services.conf. How to verify it I verified this on the device str2-7260cx3-acs-1. Which release branch to backport (provide reason below if selected) 201811 [x ] 201911 202006 202012 --- files/build_templates/sonic_debian_extension.j2 | 1 + 1 file changed, 1 insertion(+) diff --git a/files/build_templates/sonic_debian_extension.j2 b/files/build_templates/sonic_debian_extension.j2 index 63cb629394..25ffb90a45 100644 --- a/files/build_templates/sonic_debian_extension.j2 +++ b/files/build_templates/sonic_debian_extension.j2 @@ -206,6 +206,7 @@ sudo chmod 600 $FILESYSTEM_ROOT/etc/monit/conf.d/* sudo cp $IMAGE_CONFIGS/monit/process_checker $FILESYSTEM_ROOT/usr/bin/ sudo chmod 755 $FILESYSTEM_ROOT/usr/bin/process_checker sudo cp $IMAGE_CONFIGS/monit/generate_monit_config.service $FILESYSTEM_ROOT_USR_LIB_SYSTEMD_SYSTEM +echo "generate_monit_config.service" | sudo tee -a $GENERATED_SERVICE_FILE sudo cp $IMAGE_CONFIGS/monit/generate_monit_config $FILESYSTEM_ROOT/usr/bin/ sudo chmod 755 $FILESYSTEM_ROOT/usr/bin/generate_monit_config