I have a router running uhttpd by default and there is a process using lighttpd I would like to run instead. Since both processes share the same port, I would like to kill uhttpd then start up lighttpd automatically (by setting up the script that contains the commands as a cron job that runs on reboot).
When I run the commands I would like to go into the script individually, they work. When I put them in a script, I get an error message telling me the port number is in use. The commands are:
killall uhttpd
/etc/init.d/lighttpd start
The simple script I have so far is:
#!/bin/sh
killall uhttpd
sleep 5 #To give the device time to release the port
/etc/init.d/lighttpd start