Results 1 to 6 of 6
Hi to all of you
As a newbie I tried to set up an automatic program restart on Debian Lenny for fail2ban and asterisk. Google helped me to find some ...
- 05-20-2010 #1Just Joined!
- Join Date
- May 2010
- Posts
- 7
[SOLVED] Setting up an automatic program restart
Hi to all of you
As a newbie I tried to set up an automatic program restart on Debian Lenny for fail2ban and asterisk. Google helped me to find some HowTos. However, all what I tried so far doesn't work. The latest version: According some instructions the following commands have been written in a file called auto_start_stop:This file has beenCode:#! /bin/sh # /etc/init.d/auto_start_stop cd /etc/init.d/fail2ban start asterisk
-> saved in the folder /etc/init.d and
-> its properties changed with a right-click to 075.
-> The links have been created with update-rc.d auto_start_stop defaults
Any ideas why this doesn't work and how I could correct it?
- 05-21-2010 #2
Putting it in init.d does nothing to get it executed. Under what circumstances do you want it executed? Specific times or what?
- 05-21-2010 #3Just Joined!
- Join Date
- Mar 2008
- Posts
- 11
Hi,
If you want a program to start automatically and be restarted if it breaks,
run it from /etc/inittab.
I don't know the full syntax but this might put you on the right lead.
Hope this helped.
Santiago
- 05-21-2010 #4Just Joined!
- Join Date
- May 2010
- Posts
- 7
I could finally get the restart for asterisk to work. With Fail2ban I seem to have an other problem; I only found out now that for some still unknown reasons it actually doesn't yet run. This has to be solved before treating its automatic restart.
- 05-23-2010 #5
- 05-23-2010 #6Just Joined!
- Join Date
- May 2010
- Posts
- 7
The programs run on an external vserver with debian lenny stable. The aim was that those programs restart automatically after a reboot. In the case of the asterisk I had the link in runlevel 2 whereas the vserver runs on runlevel 3. For the asterisk it only needed to change the link. In the case of fail2ban I finally could get it running. For this program the automatic restart is already provided with its installation. So nothing else has to be added. The answers to my original questions have therefore been found.
Thanks for trying to help on this subject.
P.S: I hope I will find or receive also an answer to my other questions related to fail2ban which have been posed in my thread "fail2ban fails to ban".




