24 lines
689 B
Plaintext
24 lines
689 B
Plaintext
#if $str($getVar('anamon_enabled','')) == "1"
|
|
|
|
## install anamon script
|
|
wget -O /usr/local/sbin/anamon "http://$server:$http_port/cobbler/aux/anamon"
|
|
## install anamon system service
|
|
wget -O /etc/rc.d/init.d/anamon "http://$server:$http_port/cobbler/aux/anamon.init"
|
|
|
|
## adjust permissions
|
|
chmod 755 /etc/rc.d/init.d/anamon /usr/local/sbin/anamon
|
|
test -d /selinux && restorecon /etc/rc.d/init.d/anamon /usr/local/sbin/anamon
|
|
|
|
## enable the script
|
|
chkconfig --add anamon
|
|
|
|
## configure anamon service
|
|
cat << __EOT__ > /etc/sysconfig/anamon
|
|
COBBLER_SERVER="$server"
|
|
COBBLER_PORT="$http_port"
|
|
COBBLER_NAME="$name"
|
|
LOGFILES="/var/log/boot.log /var/log/messages /var/log/dmesg"
|
|
__EOT__
|
|
|
|
#end if
|