execute monit command in bash script

Issue #721 closed
david.fazeli created an issue

hi. i want in my bash script myscript.sh execute monit script . example :

monit file is:

check process mariadb with pidfile /var/mysql/mysql.pid
if failed then exec "another_script.sh"

if we want this monit file, execute by one script then return result? for sample:

#!/bin/bash

check process mariadb with pidfile /var/mysql/mysql.pid
if failed then exec "another_script.sh"
[root@server]# ./script.sh ; echo $?

Comments (2)

  1. Log in to comment