diff options
author | Thomas Guyot-Sionnest <dermoth@aei.ca> | 2012-11-07 17:57:37 +0000 |
---|---|---|
committer | Thomas Guyot-Sionnest <dermoth@aei.ca> | 2012-11-07 17:57:37 +0000 |
commit | 217a6a7643867ad949c25b5e8ca2d1839ec28133 (patch) | |
tree | 54a2cd2832a585866e1d684434bbc8ea65f12080 /tools | |
parent | d168c0023c24f0ecac44a2ed2283f2760359af31 (diff) | |
download | monitoring-plugins-217a6a7643867ad949c25b5e8ca2d1839ec28133.tar.gz |
Fix sfwebcron probe file
The initial file was created in the user's home and later tested in the
doc directory. Instead, just rsync if the file is missing.
Also add some temporary files to gitignore/make clean
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/sfwebcron | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/tools/sfwebcron b/tools/sfwebcron index c270cef2..0f31fcfb 100755 --- a/tools/sfwebcron +++ b/tools/sfwebcron @@ -12,25 +12,24 @@ trap 'echo "Command failed at line $LINENO"' ERR # Set working variables PROJECT=nagiosplug IN=${HOME}/sfwebcron +PROBE="developer-guidelines.html.last" OUT_SERVER="tonvoon@frs.sourceforge.net" OUT_PATH="/home/groups/n/na/nagiosplug/htdocs" -if [[ ! -e developer-guidelines.html.last ]] ; then - touch developer-guidelines.html.last -fi - # Get latest dev guildelines [[ ! -d $IN ]] && mkdir $IN cd $IN -if [[ ! -d nagios-plugins ]] ; then +if [[ ! -d nagios-plugins ]] +then git clone https://github.com/nagios-plugins/nagios-plugins.git nagios-plugins fi cd nagios-plugins/doc git pull make -if [[ developer-guidelines.html -nt developer-guidelines.html.last ]] ; then +if [[ ! -e $PROBE || developer-guidelines.html -nt $PROBE ]] +then rsync -av developer-guidelines.{html,sgml} $OUT_SERVER:$OUT_PATH/ - touch developer-guidelines.html.last + touch $PROBE fi |