49 | | set xymongroup ${xymonuser} |
50 | | set xytopdir ${prefix}/lib/${name} |
51 | | set xyetcdir ${xytopdir}/client/etc |
52 | | set xylogdir ${xytopdir}/client/logs |
53 | | set xytmpdir ${xytopdir}/client/tmp |
54 | | set xyvardir ${xytopdir}/data |
55 | | set xywebdir ${xytopdir}/web |
56 | | set xywwwdir ${xytopdir}/www |
57 | | |
58 | | configure.cmd ./configure.client |
59 | | configure.args-append --rrdinclude ${prefix}/include \ |
60 | | --rrdlib ${prefix}/lib \ |
61 | | --pcreinclude ${prefix}/include \ |
62 | | --pcrelib ${prefix}/lib \ |
63 | | --sslinclude ${prefix}/include \ |
64 | | --ssllib ${prefix}/lib \ |
65 | | --ldapinclude ${prefix}/include \ |
66 | | --ldaplib ${prefix}/lib \ |
67 | | --fping ${prefix}/sbin/fping |
68 | | configure.env-append ENABLESSL=y \ |
69 | | XYMONUSER=${xymonuser} \ |
70 | | XYMONTOPDIR=${xytopdir} \ |
71 | | XYMONHOSTIP=127.0.0.1 \ |
72 | | XYMONHOSTOS=${os.platform} \ |
73 | | MANROOT=${prefix}/share/man \ |
74 | | INSTALLBINDIR=${xytopdir}/client/bin \ |
75 | | INSTALLETCDIR=${xyetcdir} \ |
76 | | INSTALLEXTDIR=${xytopdir}/client/ext \ |
77 | | INSTALLTMPDIR=${xytmpdir} \ |
78 | | INSTALLWEBDIR=${xywebdir} \ |
79 | | INSTALLWWWDIR=${xywwwdir} \ |
80 | | XYMONVAR=${xyvardir} \ |
81 | | CC=${configure.cc} \ |
82 | | CXX=${configure.cxx} \ |
83 | | CPP=${configure.cpp} |
84 | | |
85 | | build.args-append CC=${configure.cc} \ |
86 | | CXX=${configure.cxx} \ |
87 | | CPP=${configure.cpp} |
88 | | |
89 | | destroot.env-append INSTALLROOT=${destroot} |
90 | | destroot.keepdirs ${destroot}${xytopdir} \ |
91 | | ${destroot}${xylogdir} \ |
92 | | ${destroot}${xytmpdir} \ |
93 | | ${destroot}${xyvardir}/logs \ |
94 | | ${destroot}${xyvardir} \ |
95 | | ${destroot}${xywebdir} |
96 | | |
97 | | startupitem.create yes |
98 | | startupitem.start "sudo su ${xymonuser} -c \"${xytopdir}/client/runclient.sh start\"" |
99 | | startupitem.stop "sudo su ${xymonuser} -c \"${xytopdir}/client/runclient.sh stop\"" |
100 | | startupitem.restart "sudo su ${xymonuser} -c \"${xytopdir}/client/runclient.sh restart\"" |
101 | | #startupitem.pidfile auto ${xylogdir}/clientlaunch.*.pid |
102 | | startupitem.pidfile none |
103 | | |
104 | | add_users ${xymonuser} group=${xymongroup} realname=Xymon\ User home=${xytopdir} shell=/bin/bash |
105 | | |
106 | | post-destroot { |
107 | | xinstall -d -o ${xymonuser} -g ${xymongroup} ${destroot}${xylogdir} |
108 | | xinstall -d -o ${xymonuser} -g ${xymongroup} ${destroot}${xytmpdir} |
109 | | # Adding a suffix to config files |
110 | | foreach f { clientlaunch.cfg localclient.cfg xymonclient.cfg } { |
111 | | move ${destroot}${xyetcdir}/${f} ${destroot}${xyetcdir}/${f}.${version} |
112 | | } |
113 | | } |
114 | | |
115 | | post-activate { |
116 | | # If not already present we put default config files |
117 | | foreach f { clientlaunch.cfg localclient.cfg xymonclient.cfg } { |
118 | | if {![file exists ${xyetcdir}/${f}]} { |
119 | | file copy ${xyetcdir}/${f}.${version} ${xyetcdir}/${f} |
120 | | } |
121 | | } |
122 | | } |
123 | | |
124 | | notes "\nSet your Xymon server's IP address with the following command: |
125 | | $ sudo vi ${xyetcdir}/xymonclient.cfg |
126 | | |
127 | | If you wish your xymon client to report logfiles to your xymon server |
128 | | you need to add the user ${xymonuser} to the admin group like this: |
129 | | $ sudo dscl . -append /Groups/admin GroupMembership ${xymonuser} |
130 | | |
131 | | You can start,stop and restart the xymon client with: |
132 | | $ sudo -u ${xymonuser} ${xytopdir}/client/runclient.sh \[start|stop|restart\] |
133 | | " |
134 | | |
135 | | use_parallel_build no |
136 | | |
137 | | livecheck.type regex |
138 | | livecheck.url http://sourceforge.net/projects/${name}/files/ |
139 | | livecheck.regex ${name}-(\[0-9.\]+)\\.tar.gz |