Results 1 to 4 of 4

Thread: restart automatically a service

  1. #1

    Default restart automatically a service

    Hello

    I have a box Suse 11.1 with a service that (I dont know why) every day stop at the same time. Im finding why it come to a halt but in the meantime I would like restart it automatically.
    As root I insert in crontab the line:

    25 16 * * * /etc/init.d/service start
    But it dont works

    If I launch manually /etc/init.d/service start (or stop) it works!
    What Iam wrong? How I can automatically restart the service?

    Thanks

  2. #2
    Join Date
    Jun 2008
    Location
    Groningen, Netherlands
    Posts
    19,662
    Blog Entries
    14

    Default Re: restart automatically a service

    Yast - System - runlevel editor. The 'service' should be there, you can activate it, so that it starts at boot time.
    ° Appreciate my reply? Click the star and let me know why.

    ° Perfection is not gonna happen. No way.

    https://en.opensuse.org/openSUSE:Board#Members
    http://en.opensuse.org/User:Knurpht
    http://nl.opensuse.org/Gebruiker:Knurpht

  3. #3
    Join Date
    Jun 2008
    Location
    Earth - Denmark
    Posts
    10,730

    Default Re: restart automatically a service

    Knurpht wrote:
    > Yast - System - runlevel editor. The 'service' should be there, you can
    > activate it, so that it starts at boot time.



    yes, but he said it *stops* running at the same time each day [have
    another espresso! ;-) ]....which i _guess_ means he has a cron (or
    cron driven script) which is killing the service (and maybe the script
    is not restarting it, or is sending an error)..

    and, all he has to do is find that cron and stop it from killing the
    service (or fix the script so it restarts as expected)..

    i _think_ a look at /var/log/messages around the time the service is
    stopped will probably give some clues about what is going on..

    --
    DenverD (Linux Counter 282315)
    CAVEAT: http://is.gd/bpoMD
    posted via NNTP w/TBird 2.0.0.23 | KDE 3.5.7 | openSUSE 10.3
    2.6.22.19-0.4-default SMP i686
    AMD Athlon 1 GB RAM | GeForce FX 5500 | ASRock K8Upgrade-760GX |
    CMedia 9761 AC'97 Audio

  4. #4
    Join Date
    Jun 2008
    Location
    Groningen, Netherlands
    Posts
    19,662
    Blog Entries
    14

    Default Re: restart automatically a service

    Thanks DD. I missed that.

    @mox88: please post output of:
    Code:
    su -c 'crontab -l'
    It would be good if you let us know what the service is, it could be set in some config files, and those do not always live in the same places.
    ° Appreciate my reply? Click the star and let me know why.

    ° Perfection is not gonna happen. No way.

    https://en.opensuse.org/openSUSE:Board#Members
    http://en.opensuse.org/User:Knurpht
    http://nl.opensuse.org/Gebruiker:Knurpht

Posting Permissions

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