I am adding startup script in Ubuntu with update-rc.d.
My script says :
#!/bin/bash
nohup curl -C - -o ~/Downloads/linuxmint-17-xfce-dvd-64bit.iso.part 'http://mirror.umd.edu/linuxmint/images/stable/17/linuxmint-17-xfce-dvd-64bit.iso'
exit
Made it executable and added in /etc/init.d
Now when I run the script manually, it runs absolutely fine.
But after adding in startup, it does not start automatically.
It throws me with an error in nohup.out as below :
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0curl: (7) Couldn't connect to server
Is there anything more I need to check or what else option I can use to run the same script on startup.
root@amol-Lenovo-G570:~# ll /etc/rc2.d/ total 20
drwxr-xr-x 2 root root 4096 Nov 7 20:24 ./
drwxr-xr-x 179 root root 12288 Nov 7 19:36 ../
lrwxrwxrwx 1 root root 32 Oct 23 12:38 K08vmware-USBArbitrator -> /etc/init.d/vmware-USBArbitrator*
lrwxrwxrwx 1 root root 20 Sep 26 2012 S19postgresql -> ../init.d/postgresql*
lrwxrwxrwx 1 root root 21 Nov 7 20:24 S20download.sh -> ../init.d/download.sh*
where download.sh is the script I am running.
total 20
drwxr-xr-x 2 root root 4096 Nov 7 20:24 ./
drwxr-xr-x 179 root root 12288 Nov 7 19:36 ../
lrwxrwxrwx 1 root root 32 Oct 23 12:38 K08vmware-USBArbitrator -> /etc/init.d/vmware-USBArbitrator*
lrwxrwxrwx 1 root root 20 Sep 26 2012 S19postgresql -> ../init.d/postgresql*
lrwxrwxrwx 1 root root 21 Nov 7 20:24 S20download.sh -> ../init.d/download.sh*
where download.sh is the script I am running.
– amolveer Nov 07 '14 at 15:01Couldn't connect to server
Your internet isn't working? – DisplayName Nov 07 '14 at 15:44