~thomnico/charms/trusty/zabbix-agent/trunk

« back to all changes in this revision

Viewing changes to hooks/config-changed

  • Committer: Samuel Cozannet
  • Date: 2014-10-07 19:33:59 UTC
  • Revision ID: samnco@gmail.com-20141007193359-hfp5j2v86gqxhmbd
removing .git history from tracking and latest ES additions

Show diffs side-by-side

added added

removed removed

Lines of Context:
25
25
# Setting default configuration
26
26
sed -i.bak -e 's/^#\ EnableRemoteCommands=0/EnableRemoteCommands=1/g' \
27
27
    -e 's/^#\ LogRemoteCommands=0/LogRemoteCommands=1/g' \
28
 
    -e "s/Server=127\.0\.0\.1/Server="${ZABBIX_SERVER}"/g" \
29
 
    -e "s/ServerActive=127\.0\.0\.1/ServerActive="${ZABBIX_SERVER}"/g" \
 
28
    -e "s/^Server=.*/Server="${ZABBIX_SERVER}"/g" \
 
29
    -e "s/^ServerActive=.*/ServerActive="${ZABBIX_SERVER}"/g" \
30
30
    -e '/Hostname=Zabbix\ server/d' \
31
31
    -e 's/^#\ AllowRoot=0/AllowRoot=1/g' \
32
32
    /etc/zabbix/zabbix_agentd.conf
39
39
# Copying data
40
40
cp -f data/user-parameter/*.conf /etc/zabbix/zabbix_agentd.d/
41
41
 
 
42
# Copying binaries
 
43
mkdir -p /opt/zabbix/externalscripts
 
44
cp -f data/bin/* /opt/zabbix/externalscripts/
 
45
chown -R zabbix:zabbix /opt/zabbix/externalscripts
 
46
chmod +x /opt/zabbix/externalscripts/*
 
47
 
42
48
hooks/start
43
49