简体   繁体   中英

How do I ensure monit starts on system startup?

I am using the Amazon Linux AMI. I want to ensure that monit on system startup always calls

monit -c $CONFIG

where $CONIFG is the default monit configuration file location (usually /etc/monit.conf ). I want to ensure it is always monitoring my services on startup.

How do I do this? I'd rather not use upstart because I'd like to restrict the number of tools I'm using for this setup.

thanks

Hi check out this documentation

It describes how to run programs on startup on CentOS systems (which is what Amazon Linux is). Basically you want to do this

sudo vi /etc/rc.d/rc.local

then add your command to the bottom of it.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM