31 lines
1.1 KiB
Plaintext
31 lines
1.1 KiB
Plaintext
#if $str($getVar('anamon_enabled','')) == "1"
|
|
#if $getVar("compass_server", "") != ""
|
|
wget -O /usr/local/sbin/anamon "http://$compass_server:$http_port/cobbler/aux/anamon"
|
|
#else
|
|
wget -O /usr/local/sbin/anamon "http://$server:$http_port/cobbler/aux/anamon"
|
|
#end if
|
|
cat << EOF > /etc/init.d/anamon.init
|
|
#raw
|
|
#!/bin/bash
|
|
## BEGIN INIT INFO
|
|
# Required-Start: $network
|
|
# Default-Start: 2 3 4 5
|
|
# Default-Stop: 0 6
|
|
# Short-Description: Starts the cobbler anamon boot notification program
|
|
# Description: anamon runs the first time a machine is booted after installation.
|
|
## END INIT INFO
|
|
#end raw
|
|
#if $getVar("compass_server","") != ""
|
|
/usr/local/sbin/anamon --watchfile "/var/log/YaST2/y2start.log /var/log/YaST2/y2log" --name $name --server $compass_server --port $http_port --exit
|
|
#else
|
|
/usr/local/sbin/anamon --watchfile "/var/log/YaST2/y2start.log /var/log/YaST2/y2log" --name $name --server $server --port $http_port --exit
|
|
#end if
|
|
chkconfig -d anamon.init
|
|
mv /etc/init.d/anamon.init /tmp/anamon.init
|
|
EOF
|
|
|
|
chmod 755 /etc/init.d/anamon.init /usr/local/sbin/anamon
|
|
chmod +x /etc/init.d/anamon.init
|
|
chkconfig anamon.init on
|
|
#end if
|