Very new to Debian (Raspbian), and I'm struggling on this one for a few days. I have a startup script that I want to execute at startup.
I have executed the following commands, to make the script executable and to add it with the default parameters to the startup sequence.
sudo chmod 755 /etc/init.d/testsam
sudo update-rc.d testsam defaults
When trying to test the script, I execute the following:
sudo /etc/init.d/testsam start
But when doing so, I get an error: unable to execute /etc/init.d/testsam: No such file or directory.
I minimized the script to the very basic, but still don't have a clue of the actual reason. I hope someone can point me out to the right solution? This is the script at current.
#! /bin/bash
# /etc/init.d/testsam
case "$1" in
start)
#echo "starting script"
;;
stop)
#echo "stopping script"
;;
*)
#echo "Usage: /etc/init.d/testsam {start|stop}"
exit 1
;;
esac
exit 0
Thanks for any help