Find the answer to your Linux question:
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 ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just 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:
    Code:
    #! /bin/sh
    # /etc/init.d/auto_start_stop
    cd
    /etc/init.d/fail2ban start
    asterisk
    This file has been
    -> 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?

  2. #2
    Linux Enthusiast Mudgen's Avatar
    Join Date
    Feb 2007
    Location
    Virginia
    Posts
    664
    Putting it in init.d does nothing to get it executed. Under what circumstances do you want it executed? Specific times or what?

  3. #3
    Just Joined!
    Join Date
    Mar 2008
    Posts
    20
    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

  4. $spacer_open
    $spacer_close
  5. #4
    Just 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.

  6. #5
    Linux Newbie unlimitedscolobb's Avatar
    Join Date
    Jan 2008
    Posts
    120
    Quote Originally Posted by METsen View Post
    As a newbie I tried to set up an automatic program restart on Debian Lenny for fail2ban and asterisk.
    As greyhairweenie points out, you would make your question considerably clearer if you specified why do you need to restart those programs automatically and when do you need to restart them. Right now we cannot give specific advice for obvious reasons.

  7. #6
    Just 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".

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •