service X does not support chkconfig

Here is how to fix this:

(Assume the name of my script is myscript)

1 – Copy your script into /etc/init.d folder
2 – cd /etc/init.d
3 – chmod +x myscript
4 – Add these lines, including #, right after #!/bin/bash or #!/bin/sh:

# chkconfig: 2345 95 20
# description: Some description
# What your script does (not sure if this is necessary though)
# processname: myscript

5 – chkconfig –level 2345 myscript on

service X does not support chkconfig
Filed under: General,Server   Posted by: CodingRecipes

28 Comments »

  1. John:
     

    It was the first thing that popped up on Google, and the only thing I needed to add. Many Thanks!

    Comment

     
  2.  

    Many thanks! I am no longer lost!

    Comment

     
  3. Matt:
     

    Perfect.

    Ditto John’s comment.

    Thanks!

    Comment

     
  4. VIKAS:
     

    THanks, helped me. !!

    Comment

     
  5. Dan:
     

    Big eternal gratitude: you answered a long standing question.

    Comment

     
  6.  

    THanks, helped me. !!

    Comment

     
  7. Emilio:
     

    Thanks! You made my day ;)

    Comment

     
  8. JayaRaj:
     

    Thanks a Lot! Perfect!! Made my life easy .. feeling relaxed..

    Comment

     
  9. pharlah:
     

    thanks a bunch… you are a livesaver

    Comment

     
  10. mr570:
     

    Thanks a million! Saved my @$$

    Comment

     
  11. Lee:
     

    Looked all over for this info.
    Thankyou.

    Comment

     
  12. Brad:
     

    Hey. This worked. Thanks a bunch! Without your help I would not have figured out why I was getting the message that my script was not chkconfig compliant.

    Comment

     
  13. John:
     

    VERY THANKS !

    Comment

     
  14.  

    Great! Exactly what I was looking for. This solved a problem with a bash daemon of mine. I will post it soon on github.com/renich

    It’s an ipUpdaterd for DNSExit ;)

    Comment

     
  15. MIC:
     

    very nice … thanks

    Comment

     
  16. sphinx:
     

    You are the man… :-)

    Comment

     
  17. lovetide:
     

    Thanks, and also, make sure the start/stop priority after “chkconfig: RUN-LEVELS ” is less than 100 (i got “service X does not support chkconfig error” when start/stop priority >= 100).

    Comment

     
  18. Tommy:
     

    Thank you
    my friend, you are so cool

    Comment

     
  19. عباس:
     

    ممنون مشکلم رو برطرف کرد

    Comment

     
  20. هادی:
     

    داش علی دمت گرم خیلی دنبالش بودم مشکلم حل شد.
    زنده باشی

    Comment

     
  21. Bibish:
     

    Thx man !

    Comment

     
  22. Expo:
     

    Thanks for help! You could add the decribtion of priorities. Nevertheless still good job :)

    Comment

     
  23. veelck:
     

    This was simple and fast – thanks a lot!

    Comment

     
  24. artaxerxe:
     

    Thank you! It worked great for me!

    Comment

     
  25. Dennis McEntire:
     

    Just a quick note of thanks for this — saved the day for me. Didn’t realize how this worked before so this article was very helpful for me.

    Comment

     
  26. Jack:
     

    Thanks! This worked great.

    Comment

     
  27. Linux Newbie:
     

    Great – works perfectly!

    Comment

     
  28. Rich:
     

    Thank you so much!!

    Comment

     

RSS feed for comments on this post. TrackBack URL

Leave a comment