How to make a script run at boot time in Debian Wheezy?
Solution 1
Looks like you're trying to use update-rc.d
as an unprivileged user? Since this tool is located in /usr/sbin/
you probably don't have it in your $PATH
. So try running it as root user or call it via sudo update-rc.d
.
Solution 2
Your script has to contain a LSB (Linux Standards Base) header which indicates its dependencies and capabilities (see https://wiki.debian.org/LSBInitScripts for more about LSB headers).
If a LSB header is present, you can use insserv
to include your script in the boot process (see https://wiki.debian.org/LSBInitScripts/DependencyBasedBoot for more information).
Related videos on Youtube
donatello
Updated on September 18, 2022Comments
-
donatello over 1 year
I am writing a script to do some tasks at boot up time in my Debian Wheezy AWS EC2 AMI. Sources on the internet say that usual way to do this is to use
update-rc.d
to install the symlinks needed to set it up to run at boot time.However, when I try this, I get the error
$ update-rc.d -bash: update-rc.d: command not found
This method has been working for me till Debian Squeeze. Has the standard way to do this changed in Debian 7.0? I am not able to find any documentation that explains how to do it in the official way.