Add better checks for pastebin.ca availability
PATCH 1/1 Add better checks for pastebin.ca availability
At the moment, it seems that a) pastebin.ca (the host) is UP, and b) the WEB SERVER on it is DOWN.
So ive implemented (even if messy) an extra check for this scenario. I would consider using another pastebin service, but we have it pretty good with slepp (the pastebin.ca owner) as he has allowed us to have our own paste 'type' (which enables the areas to collapse, highlighting of certain things, etc).
Changelog: Added an extra check to see if the Web Server is functioning on our pastebin service. Now we check that the host is up, and the webserver itself is alive.
Patch Attached.
alsa-info.sh.wishie renamed from alsa-info.sh +11 -2
@@ -1,6 +1,6 @@ #!/bin/bash -SCRIPT_VERSION=0.4.48 +SCRIPT_VERSION=0.4.49 CHANGELOG="http://www.alsa-project.org/alsa-info.sh.changelog" #################################################################################
@@ -32,8 +32,17 @@ PASTEBINKEY="C9cRIO8m/9y8Cs0nVs0FraRx7U0pHsuc" #Define some simple functions +pbweb(){ +[[ $(wget http://pastebin.ca/index.php &> /dev/null) ]] || KEEP_FILES="yes" NOUPLOAD="yes" PBERROR="yes" +} + pbcheck(){ - [[ $(ping -c1 www.pastebin.ca) ]] || KEEP_FILES="yes" NOUPLOAD="yes" PBERROR="yes" +if [[ $(ping -c1 www.pastebin.ca) ]] +then +pbweb +else +KEEP_FILES="yes" NOUPLOAD="yes" PBERROR="yes" +fi } update() {
_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
At Wed, 02 Jul 2008 00:52:14 +1000,
Quoted 10 lines · Travis Place
At the moment, it seems that a) pastebin.ca (the host) is UP, and b) the WEB SERVER on it is DOWN.
So ive implemented (even if messy) an extra check for this scenario. I would consider using another pastebin service, but we have it pretty good with slepp (the pastebin.ca owner) as he has allowed us to have our own paste 'type' (which enables the areas to collapse, highlighting of certain things, etc).
Quoted 7 lines
Changelog: Added an extra check to see if the Web Server is functioning on our pastebin service. Now we check that the host is up, and the webserver itself is alive.
Patch Attached.
Signed-off-by Travis Place <[email protected]>
The change looks fine, but any reason to use [[..]]] instead of normal test or [ ?
thanks,
Takashi
Quoted 30 lines
[2 alsa-info.patch-0.4.49 <text/x-patch; UTF-8 (7bit)>]
alsa-info.sh.wishie renamed from alsa-info.sh +11
-2@@ -1,6 +1,6 @@ #!/bin/bash -SCRIPT_VERSION=0.4.48 +SCRIPT_VERSION=0.4.49 CHANGELOG="http://www.alsa-project.org/alsa-info.sh.changelog" #################################################################################@@ -32,8 +32,17 @@ PASTEBINKEY="C9cRIO8m/9y8Cs0nVs0FraRx7U0pHsuc" #Define some simple functions +pbweb(){ +[[ $(wget http://pastebin.ca/index.php &> /dev/null) ]] || KEEP_FILES="yes" NOUPLOAD="yes" PBERROR="yes" +} + pbcheck(){ - [[ $(ping -c1 www.pastebin.ca) ]] || KEEP_FILES="yes" NOUPLOAD="yes" PBERROR="yes" +if [[ $(ping -c1 www.pastebin.ca) ]] +then +pbweb +else +KEEP_FILES="yes" NOUPLOAD="yes" PBERROR="yes" +fi } update() {