guys, I wanted to run sakis 3g automatically on startup. I have already written the code for configuration using sudo nano /etc/sakis3g.conf.
Whenever I type sudo ./sakis3g connect, the usb modem gets connected within a minute.
Now, I want this command to be executed on the boot up of the raspberry pi.
So, I tried adding this command " sudo ./sakis3g connect " to rc.local, it did not work.
So , I wrote this script below which also did not work .
1st, I executed sudo nano /etc/init.d/sakis3g
[code]
#! /bin/sh
# /etc/init.d/foobar
# The following part always gets executed.
echo "This part always gets executed"
# The following part carries out specific functions depending on arguments.
case "$1" in
start)
sudo ./sakis3g connect
motion
;;
stop)
sudo ./sakis3g disconnect
echo "camera is dead"
;;
*)
echo "Usage: /etc/init.d/sakis3g {start|stop}"
exit 1
;;
esac
exit 0
[/code]
I have also included motion command above in order for the motion software to start on bootup.
After this I executed these two commands .
sudo chmod 755 /etc/init.d/sakis3g
sudo chown root:root /etc/init.d/sakis3g
The internet is not getting connected.
I have to do it manually by typing sudo ./sakis3g connect for it to connect.
Please help with this script.