Why isn't monit firing off git properly? -


i have monit service running.
checks see if file changed, fires off script make sure file gets put git:

check file ncc_db path /home/ootbdv/ncc_db/production.sqlite3       if changed checksum exec "/home/ootbdv/ncc_db/autocommit.sh" 

i know i've setup monit correctly because log file shows this.

[pdt jun  3 01:04:14] info     : 'ncc_db' checksum has not changed [pdt jun  3 01:10:14] error    : 'ncc_db' checksum changed /home/ootbdv/ncc_db/production.sqlite3 [pdt jun  3 01:10:14] info     : 'ncc_db' exec: /home/ootbdv/ncc_db/autocommit.sh [pdt jun  3 01:12:14] error    : 'ncc_db' checksum changed /home/ootbdv/ncc_db/production.sqlite3 [pdt jun  3 01:12:14] info     : 'ncc_db' exec: /home/ootbdv/ncc_db/autocommit.sh [pdt jun  3 01:14:14] info     : 'ncc_db' checksum has not changed 

so know monit working.
know script working because, root, when type in /home/ootbdv/ncc_db/autocommit.sh script works expected, jumps directory , fires off git command.

the script:

#/bin/bash  cd /home/ootbdv/ncc_db/ git commit -a -m 'monit:autocommit' 

am doing wrong such monit isn't working expected?

looks script correct did not push added files remote repository.

you added file local repository , have push remote repository

the script:

#/bin/bash  cd /home/ootbdv/ncc_db/ git commit -a -m 'monit:autocommit' git push <origin_name> <branch_name> 

Comments