make init.d script start at boot
Clash 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?
debian
add a comment |Â
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?
debian
What of thestop
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 Smoorenburgrc
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
add a comment |Â
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?
debian
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
debian
asked Oct 1 '17 at 22:18
Arya
1378
1378
What of thestop
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 Smoorenburgrc
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
add a comment |Â
What of thestop
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 Smoorenburgrc
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
add a comment |Â
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.
add a comment |Â
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
add a comment |Â
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.
add a comment |Â
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.
add a comment |Â
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.
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.
answered Oct 2 '17 at 0:31
icarus
4,7781725
4,7781725
add a comment |Â
add a comment |Â
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
add a comment |Â
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
add a comment |Â
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
# 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
answered Nov 9 '17 at 16:54
nafdef
1
1
add a comment |Â
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
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
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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