first snippet i have tested
Code: Select all
bind pub - !servcontrol pub_servcontrol
proc pub_servcontrol {nick uhost hand chan arg} {
putchan $chan "\00312...\00304trying to Start Services on Remote maschine "
set serv "/home/test/services/services"
eval exec $serv
}
second snippet
Code: Select all
bind pub - !servcontrol pub_servcontrol
proc pub_servcontrol {nick uhost hand chan arg} {
putchan $chan "\00312...\00304trying to Start Services on Remote maschine "
set su "su root"
eval exec $su
set pw "pw here"
eval exec $pw
}
bind pub - !servstart pub_servstart
proc pub_servstart {nick uhost hand chan arg} {
exec "/home/test/services/services"
}
some ideas or is there a script thats looks every half hour
if Services are online {halt}
if Services are offline exec /home/test/services/services