summaryrefslogtreecommitdiffstats
path: root/zarb-ml/mageia-sysadm/2010-November/000680.html
blob: f891b389d7a0847a9f1923c0dba41c7fa6df9644 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
 <HEAD>
   <TITLE> [Mageia-sysadm] [338] - allows the PATH_TO_FILE value to be	overidden for testing purpose
   </TITLE>
   <LINK REL="Index" HREF="index.html" >
   <LINK REL="made" HREF="mailto:mageia-sysadm%40mageia.org?Subject=Re%3A%20%5BMageia-sysadm%5D%20%5B338%5D%20-%20allows%20the%20PATH_TO_FILE%20value%20to%20be%0A%09overidden%20for%20testing%20purpose&In-Reply-To=%3C20101120084707.62B203FBCB%40valstar.mageia.org%3E">
   <META NAME="robots" CONTENT="index,nofollow">
   <META http-equiv="Content-Type" content="text/html; charset=us-ascii">
   <LINK REL="Previous"  HREF="000679.html">
   <LINK REL="Next"  HREF="000681.html">
 </HEAD>
 <BODY BGCOLOR="#ffffff">
   <H1>[Mageia-sysadm] [338] - allows the PATH_TO_FILE value to be	overidden for testing purpose</H1>
    <B>root at mageia.org</B> 
    <A HREF="mailto:mageia-sysadm%40mageia.org?Subject=Re%3A%20%5BMageia-sysadm%5D%20%5B338%5D%20-%20allows%20the%20PATH_TO_FILE%20value%20to%20be%0A%09overidden%20for%20testing%20purpose&In-Reply-To=%3C20101120084707.62B203FBCB%40valstar.mageia.org%3E"
       TITLE="[Mageia-sysadm] [338] - allows the PATH_TO_FILE value to be	overidden for testing purpose">root at mageia.org
       </A><BR>
    <I>Sat Nov 20 09:47:07 CET 2010</I>
    <P><UL>
        <LI>Previous message: <A HREF="000679.html">[Mageia-sysadm] [337] - -n is needed to interpret \n for the bash builtin version, spotted by ahmad78
</A></li>
        <LI>Next message: <A HREF="000681.html">[Mageia-sysadm] Http server problem
</A></li>
         <LI> <B>Messages sorted by:</B> 
              <a href="date.html#680">[ date ]</a>
              <a href="thread.html#680">[ thread ]</a>
              <a href="subject.html#680">[ subject ]</a>
              <a href="author.html#680">[ author ]</a>
         </LI>
       </UL>
    <HR>  
<!--beginarticle-->
<PRE>Revision: 338
Author:   misc
Date:     2010-11-20 09:47:07 +0100 (Sat, 20 Nov 2010)
Log Message:
-----------
- allows the PATH_TO_FILE value to be overidden for testing purpose
- check the return of wget and stop if the server do not answer, to prevent resending notification once server is restarted 

Modified Paths:
--------------
    puppet/modules/blog/templates/check_new-blog-post.sh

Modified: puppet/modules/blog/templates/check_new-blog-post.sh
===================================================================
--- puppet/modules/blog/templates/check_new-blog-post.sh	2010-11-20 08:38:06 UTC (rev 337)
+++ puppet/modules/blog/templates/check_new-blog-post.sh	2010-11-20 08:47:07 UTC (rev 338)
@@ -1,9 +1,12 @@
 #!/bin/sh
 
 # Initialization
-PATH_TO_FILE=&quot;/var/lib/blog&quot;
+PATH_TO_FILE=${PATH_TO_FILE:-/var/lib/blog}
 /usr/bin/wget -qO $PATH_TO_FILE&quot;/RSS_new&quot; <A HREF="http://blog.mageia.org/?feed=rss2">http://blog.mageia.org/?feed=rss2</A>
-
+if [ -n $? ] 
+then
+        exit 2
+fi
 # Check if RSS_old exists
 if [ ! -f $PATH_TO_FILE&quot;/RSS_old&quot; ]
 	then
-------------- next part --------------
An HTML attachment was scrubbed...
URL: &lt;/pipermail/mageia-sysadm/attachments/20101120/5f6aeda6/attachment.html&gt;
</PRE>





<!--endarticle-->
    <HR>
    <P><UL>
        <!--threads-->
	<LI>Previous message: <A HREF="000679.html">[Mageia-sysadm] [337] - -n is needed to interpret \n for the bash builtin version, spotted by ahmad78
</A></li>
	<LI>Next message: <A HREF="000681.html">[Mageia-sysadm] Http server problem
</A></li>
         <LI> <B>Messages sorted by:</B> 
              <a href="date.html#680">[ date ]</a>
              <a href="thread.html#680">[ thread ]</a>
              <a href="subject.html#680">[ subject ]</a>
              <a href="author.html#680">[ author ]</a>
         </LI>
       </UL>

<hr>
<a href="https://www.mageia.org/mailman/listinfo/mageia-sysadm">More information about the Mageia-sysadm
mailing list</a><br>
</body></html>