make init.d script start at boot

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
0
down vote

favorite












I have created the following file in /etc/init.d



#! /bin/sh
# /etc/init.d/ndppd

# Carry out specific functions when asked to by the system
case "$1" in
start)
ndppd -d
;;
*)
echo "Usage: /etc/init.d/ndppd start"
exit 1
;;
esac

exit 0


I then executed chmod +x /etc/init.d/ndppd



I want ndppd to run at startup, so I ran update-rc.d ndppd defaults



but when I run update-rc.d ndppd defaults



I get no output



Why is that? what is the proper way to make my init.d script to run the "start" section at boot?










share|improve this question





















  • What of the stop case?
    – George Udosen
    Oct 1 '17 at 23:09










  • @george I don't have a stop section, and I don't need one for this daemon. I need it to be running at all times. The issue I have now is that it does not start at boot.
    – Arya
    Oct 1 '17 at 23:35










  • Which version of Debian is this? If it is Debian 8 or later, why are you even starting here with a van Smoorenburg rc script? If it is Debian 9 or later, why are you not using what the ndppd package itself supplies?
    – JdeBP
    Oct 2 '17 at 6:01










  • @JdeBP I had no idea this was part of the repository. I'll just use that thanks
    – Arya
    Oct 2 '17 at 6:03














up vote
0
down vote

favorite












I have created the following file in /etc/init.d



#! /bin/sh
# /etc/init.d/ndppd

# Carry out specific functions when asked to by the system
case "$1" in
start)
ndppd -d
;;
*)
echo "Usage: /etc/init.d/ndppd start"
exit 1
;;
esac

exit 0


I then executed chmod +x /etc/init.d/ndppd



I want ndppd to run at startup, so I ran update-rc.d ndppd defaults



but when I run update-rc.d ndppd defaults



I get no output



Why is that? what is the proper way to make my init.d script to run the "start" section at boot?










share|improve this question





















  • What of the stop case?
    – George Udosen
    Oct 1 '17 at 23:09










  • @george I don't have a stop section, and I don't need one for this daemon. I need it to be running at all times. The issue I have now is that it does not start at boot.
    – Arya
    Oct 1 '17 at 23:35










  • Which version of Debian is this? If it is Debian 8 or later, why are you even starting here with a van Smoorenburg rc script? If it is Debian 9 or later, why are you not using what the ndppd package itself supplies?
    – JdeBP
    Oct 2 '17 at 6:01










  • @JdeBP I had no idea this was part of the repository. I'll just use that thanks
    – Arya
    Oct 2 '17 at 6:03












up vote
0
down vote

favorite









up vote
0
down vote

favorite











I have created the following file in /etc/init.d



#! /bin/sh
# /etc/init.d/ndppd

# Carry out specific functions when asked to by the system
case "$1" in
start)
ndppd -d
;;
*)
echo "Usage: /etc/init.d/ndppd start"
exit 1
;;
esac

exit 0


I then executed chmod +x /etc/init.d/ndppd



I want ndppd to run at startup, so I ran update-rc.d ndppd defaults



but when I run update-rc.d ndppd defaults



I get no output



Why is that? what is the proper way to make my init.d script to run the "start" section at boot?










share|improve this question













I have created the following file in /etc/init.d



#! /bin/sh
# /etc/init.d/ndppd

# Carry out specific functions when asked to by the system
case "$1" in
start)
ndppd -d
;;
*)
echo "Usage: /etc/init.d/ndppd start"
exit 1
;;
esac

exit 0


I then executed chmod +x /etc/init.d/ndppd



I want ndppd to run at startup, so I ran update-rc.d ndppd defaults



but when I run update-rc.d ndppd defaults



I get no output



Why is that? what is the proper way to make my init.d script to run the "start" section at boot?







debian






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Oct 1 '17 at 22:18









Arya

1378




1378











  • What of the stop case?
    – George Udosen
    Oct 1 '17 at 23:09










  • @george I don't have a stop section, and I don't need one for this daemon. I need it to be running at all times. The issue I have now is that it does not start at boot.
    – Arya
    Oct 1 '17 at 23:35










  • Which version of Debian is this? If it is Debian 8 or later, why are you even starting here with a van Smoorenburg rc script? If it is Debian 9 or later, why are you not using what the ndppd package itself supplies?
    – JdeBP
    Oct 2 '17 at 6:01










  • @JdeBP I had no idea this was part of the repository. I'll just use that thanks
    – Arya
    Oct 2 '17 at 6:03
















  • What of the stop case?
    – George Udosen
    Oct 1 '17 at 23:09










  • @george I don't have a stop section, and I don't need one for this daemon. I need it to be running at all times. The issue I have now is that it does not start at boot.
    – Arya
    Oct 1 '17 at 23:35










  • Which version of Debian is this? If it is Debian 8 or later, why are you even starting here with a van Smoorenburg rc script? If it is Debian 9 or later, why are you not using what the ndppd package itself supplies?
    – JdeBP
    Oct 2 '17 at 6:01










  • @JdeBP I had no idea this was part of the repository. I'll just use that thanks
    – Arya
    Oct 2 '17 at 6:03















What of the stop case?
– George Udosen
Oct 1 '17 at 23:09




What of the stop case?
– George Udosen
Oct 1 '17 at 23:09












@george I don't have a stop section, and I don't need one for this daemon. I need it to be running at all times. The issue I have now is that it does not start at boot.
– Arya
Oct 1 '17 at 23:35




@george I don't have a stop section, and I don't need one for this daemon. I need it to be running at all times. The issue I have now is that it does not start at boot.
– Arya
Oct 1 '17 at 23:35












Which version of Debian is this? If it is Debian 8 or later, why are you even starting here with a van Smoorenburg rc script? If it is Debian 9 or later, why are you not using what the ndppd package itself supplies?
– JdeBP
Oct 2 '17 at 6:01




Which version of Debian is this? If it is Debian 8 or later, why are you even starting here with a van Smoorenburg rc script? If it is Debian 9 or later, why are you not using what the ndppd package itself supplies?
– JdeBP
Oct 2 '17 at 6:01












@JdeBP I had no idea this was part of the repository. I'll just use that thanks
– Arya
Oct 2 '17 at 6:03




@JdeBP I had no idea this was part of the repository. I'll just use that thanks
– Arya
Oct 2 '17 at 6:03










2 Answers
2






active

oldest

votes

















up vote
0
down vote













You need a symlink in /etc/rc3.d to this file. The name needs to start with capital S and by convention then has 2 digits and a name like nppd.



The files are sorted by name, so the 2 digits effectively give the order.



In order to be able to use update-rc you need some magic comments in the file.






share|improve this answer



























    up vote
    0
    down vote













    # Provides: ndppd
    # Required-Start: $local_fs $remote_fs
    # Required-Stop: $local_fs $remote_fs
    # Should-Start: $syslog
    # Should-Stop: $syslog
    # Default-Start: 2 3 4 5
    # Default-Stop: 0 1 6
    # Short-Description: Start or stop the inetd daemon.
    ### END INIT INFO


    Should be at the beginning of the file write after #!/bin/sh -e






    share|improve this answer




















      Your Answer







      StackExchange.ready(function()
      var channelOptions =
      tags: "".split(" "),
      id: "106"
      ;
      initTagRenderer("".split(" "), "".split(" "), channelOptions);

      StackExchange.using("externalEditor", function()
      // Have to fire editor after snippets, if snippets enabled
      if (StackExchange.settings.snippets.snippetsEnabled)
      StackExchange.using("snippets", function()
      createEditor();
      );

      else
      createEditor();

      );

      function createEditor()
      StackExchange.prepareEditor(
      heartbeatType: 'answer',
      convertImagesToLinks: false,
      noModals: false,
      showLowRepImageUploadWarning: true,
      reputationToPostImages: null,
      bindNavPrevention: true,
      postfix: "",
      onDemand: true,
      discardSelector: ".discard-answer"
      ,immediatelyShowMarkdownHelp:true
      );



      );













       

      draft saved


      draft discarded


















      StackExchange.ready(
      function ()
      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f395528%2fmake-init-d-script-start-at-boot%23new-answer', 'question_page');

      );

      Post as a guest






























      2 Answers
      2






      active

      oldest

      votes








      2 Answers
      2






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes








      up vote
      0
      down vote













      You need a symlink in /etc/rc3.d to this file. The name needs to start with capital S and by convention then has 2 digits and a name like nppd.



      The files are sorted by name, so the 2 digits effectively give the order.



      In order to be able to use update-rc you need some magic comments in the file.






      share|improve this answer
























        up vote
        0
        down vote













        You need a symlink in /etc/rc3.d to this file. The name needs to start with capital S and by convention then has 2 digits and a name like nppd.



        The files are sorted by name, so the 2 digits effectively give the order.



        In order to be able to use update-rc you need some magic comments in the file.






        share|improve this answer






















          up vote
          0
          down vote










          up vote
          0
          down vote









          You need a symlink in /etc/rc3.d to this file. The name needs to start with capital S and by convention then has 2 digits and a name like nppd.



          The files are sorted by name, so the 2 digits effectively give the order.



          In order to be able to use update-rc you need some magic comments in the file.






          share|improve this answer












          You need a symlink in /etc/rc3.d to this file. The name needs to start with capital S and by convention then has 2 digits and a name like nppd.



          The files are sorted by name, so the 2 digits effectively give the order.



          In order to be able to use update-rc you need some magic comments in the file.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Oct 2 '17 at 0:31









          icarus

          4,7781725




          4,7781725






















              up vote
              0
              down vote













              # Provides: ndppd
              # Required-Start: $local_fs $remote_fs
              # Required-Stop: $local_fs $remote_fs
              # Should-Start: $syslog
              # Should-Stop: $syslog
              # Default-Start: 2 3 4 5
              # Default-Stop: 0 1 6
              # Short-Description: Start or stop the inetd daemon.
              ### END INIT INFO


              Should be at the beginning of the file write after #!/bin/sh -e






              share|improve this answer
























                up vote
                0
                down vote













                # Provides: ndppd
                # Required-Start: $local_fs $remote_fs
                # Required-Stop: $local_fs $remote_fs
                # Should-Start: $syslog
                # Should-Stop: $syslog
                # Default-Start: 2 3 4 5
                # Default-Stop: 0 1 6
                # Short-Description: Start or stop the inetd daemon.
                ### END INIT INFO


                Should be at the beginning of the file write after #!/bin/sh -e






                share|improve this answer






















                  up vote
                  0
                  down vote










                  up vote
                  0
                  down vote









                  # Provides: ndppd
                  # Required-Start: $local_fs $remote_fs
                  # Required-Stop: $local_fs $remote_fs
                  # Should-Start: $syslog
                  # Should-Stop: $syslog
                  # Default-Start: 2 3 4 5
                  # Default-Stop: 0 1 6
                  # Short-Description: Start or stop the inetd daemon.
                  ### END INIT INFO


                  Should be at the beginning of the file write after #!/bin/sh -e






                  share|improve this answer












                  # Provides: ndppd
                  # Required-Start: $local_fs $remote_fs
                  # Required-Stop: $local_fs $remote_fs
                  # Should-Start: $syslog
                  # Should-Stop: $syslog
                  # Default-Start: 2 3 4 5
                  # Default-Stop: 0 1 6
                  # Short-Description: Start or stop the inetd daemon.
                  ### END INIT INFO


                  Should be at the beginning of the file write after #!/bin/sh -e







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Nov 9 '17 at 16:54









                  nafdef

                  1




                  1



























                       

                      draft saved


                      draft discarded















































                       


                      draft saved


                      draft discarded














                      StackExchange.ready(
                      function ()
                      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f395528%2fmake-init-d-script-start-at-boot%23new-answer', 'question_page');

                      );

                      Post as a guest













































































                      Popular posts from this blog

                      How to check contact read email or not when send email to Individual?

                      Bahrain

                      Postfix configuration issue with fips on centos 7; mailgun relay