Writing my public IP to Dropbox, Cronjob


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Writing my public IP to Dropbox, Cronjob
# 1  
Old 07-02-2013
Writing my public IP to Dropbox, Cronjob

Hello. I want to achieve this:

1.) Finding my public IP. I have this and it works perfectly:

Code:
wget http://ipecho.net/plain -O - -q ; echo

2.) I need to write this in a dropbox folder (let's say /home/myusername/dropbox).

3.) Put this script in a cronjob for repeating this every 10 minutes.

Can you help me with 2.) and 3.) steps? Thank you very much!

---------- Post updated at 03:14 PM ---------- Previous update was at 02:54 PM ----------

My step 2:

Code:
wget http://ipecho.net/plain -O - -q > /root/Dropbox/IP/ip3.txt

---------- Post updated at 03:24 PM ---------- Previous update was at 03:14 PM ----------

My step 3.)

Code:
Type crontab -e command:
 crontab -e
Append following job:
 15 * * * * /path/to/script.php

Thanks anyway. Smilie
# 2  
Old 07-02-2013
You could put that step 2 of yours into your crontab; for the syntax see man crontab.
Why don't you use a dynamic DNS service?
This User Gave Thanks to RudiC For This Post:
# 3  
Old 07-03-2013
Quote:
Originally Posted by RudiC
You could put that step 2 of yours into your crontab; for the syntax see man crontab.
Why don't you use a dynamic DNS service?
Thank you, figured that out but I want it inside a script.

Why Dropbox and not DynamicDNS? Because I like to live dangerously! XD Smilie

No, I wanted to learn something new. Smilie

Thank you.
Login or Register to Ask a Question

Previous Thread | Next Thread

8 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Debian Synaptic locked up after trying to install Dropbox

Hello, I am running LinuxCNC (Debian Wheezy), I tried to install Dropbox via Synaptic Package Manager, apparently Dropbox is a dead stick on that OS. Now Synaptic is unable to start with the following message: E: dpkg was interrupted, you must manually run 'dpkg --configure -a'... (0 Replies)
Discussion started by: awg
0 Replies

2. What is on Your Mind?

A public thank you...

AudioScope.sh has now had 2 votes of 5 stars. It has also been thanked in the latest upload... Although I know who thanked this kids project, and I have personally thanked that person, this is a public thank you to the two anonymous people who have voted it 5 stars. Thank you. It has... (0 Replies)
Discussion started by: wisecracker
0 Replies

3. What is on Your Mind?

How safe is Dropbox and Ubuntu one? Would you store critical files or programs there? Any comments o

How safe is Dropbox and Ubuntu one? Would you store critical files or programs there? Any comments on the guarantee that the two companies provide and on the technology used for encryption? (1 Reply)
Discussion started by: frad
1 Replies

4. Programming

How to Integrate DropBox in PHP Web Application?

Hello, I am PHP web application developer and I am working on a web app php, html based. But due to client requirement they want to save database backup on a Dropbox account. Is there a way to do that? Thanks in advance (1 Reply)
Discussion started by: AimyThomas
1 Replies

5. IP Networking

ping from public IP

I have 2 ethernet cards at my server,OEL5.5. One is for Public LAN and another is for private to install Oracle RAC. I am facing the following problem # ping 192.168.165.120 PING 192.168.165.120 (192.168.165.120) 56(84) bytes of data. 64 bytes from 192.168.165.120: icmp_seq=1 ttl=64... (3 Replies)
Discussion started by: faruque.ahmed
3 Replies

6. IP Networking

Public IP

I guys, I have a compute at home and I want access it from outside with a public IP, and the problem is that my ISP distributed private IP addresses and to access the Internet is through NAT and. I want to access that computer via SSH from other network, how can I do that? (1 Reply)
Discussion started by: pharaoh
1 Replies

7. Shell Programming and Scripting

What are public keys in ssh and how do we create the public keys??

Hi All, I am having knowledge on some basics of ssh and wanted to know what are the public keys and how can we create and implement it in connecting server. Please provide the information for the above, it would be helpful for me. Thanks, Ravindra (1 Reply)
Discussion started by: ravi3cha
1 Replies

8. UNIX for Dummies Questions & Answers

how to cancel a cronjob if the cronjob still running

hi everyone I'm newbie in this forum hope I can get some help here :) I have a command in crontab that executed every 1 minute sometime this command need more than 1 minute to finish the problem is, the crontab execute this command although it's not finish processing yet and causing the system... (7 Replies)
Discussion started by: 2j4h
7 Replies
Login or Register to Ask a Question