LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 06-12-2014, 05:46 AM   #1
Dannermax
LQ Newbie
 
Registered: Jun 2014
Posts: 26

Rep: Reputation: Disabled
Send prowl notification when file dosent exist?


Hello.

I was wondering how i write a bash script, which would send a prowl notification to my iphone, whenever a specific file on my raspberry pi raspbian/debian based) becomes unavailable?

This is what i have so far: (This should warn me if a file is unavailable)

Code:
if [[ ! -f /tmp/foo.txt ]]; then
    echo "File not found!"
fi
And This is the prowl command: (I Think)

Code:
$ wget --post-data 'apikey=2541[snip]4d77&application=wget&event=Test message&description=I can use wget' -O - https://api.prowlapp.com/publicapi/add



But how do i combine these two into one bash script?
Thanks
 
Old 06-12-2014, 08:49 AM   #2
linosaurusroot
Member
 
Registered: Oct 2012
Distribution: OpenSuSE,RHEL,Fedora,OpenBSD
Posts: 982
Blog Entries: 2

Rep: Reputation: 244Reputation: 244Reputation: 244
Tell us more about your thinking on this. I can't see where you're stuck.
 
Old 06-12-2014, 04:14 PM   #3
Dannermax
LQ Newbie
 
Registered: Jun 2014
Posts: 26

Original Poster
Rep: Reputation: Disabled
Thank you for your help. actually I found an answer to my problem here:

http://minordiscoveries.wordpress.co...-raspberry-pi/

Thanks for your reply though!!
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Need advice on writing a script to check if a file exists and send notification santosh662 Linux - Server 20 04-09-2012 08:57 AM
[SOLVED] notify-send notification look (design) michal017 Linux - Software 4 07-21-2011 01:32 AM
Can anyone send me partroot-1.6.5.img? This file doesn't exist on its homepage. HELP! kornerr General 3 05-01-2005 11:46 AM
Mailman-2.1.5 can't send notification e-mail igueths Linux - Software 1 12-22-2004 02:13 PM
im loking for somting that prob dosent exist robodude Linux - Distributions 3 08-30-2004 10:49 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 08:22 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration