source: npl/monitoring/zabbix_conf/root/etc/postinst.d/post.zabbix

Last change on this file was 2bbc214, checked in by Edwin Eefting <edwin@datux.nl>, 7 years ago

fix zabbix directories and permissions

  • Property mode set to 100644
File size: 590 bytes
Line 
1#!/bin/bash
2
3useradd zabbix
4svcrestart /service/nscd
5
6if ! crontab -l | grep syn3-zabbix-send; then
7        crontab -l > /tmp/$$.cron || exit 1
8        echo '* * * * * /sbin/syn3-zabbix-send &>/dev/null' >> /tmp/$$.cron || exit 1
9        cat /tmp/$$.cron | crontab - || exit 1
10        rm /tmp/$$.cron
11fi
12
13#first time installation?
14if [ `ls /var/log/packages/zabbix_conf-* 2>/dev/null|wc -l` == "1" ]; then
15        #make sure its disabled
16        touch /service/zabbix/down
17        svcstop /service/zabbix
18fi
19
20touch /var/log/zabbix_agentd.log
21chown zabbix /var/log/zabbix_agentd.log
22
23exit 0
Note: See TracBrowser for help on using the repository browser.