deprecate wget, use curl instead
This commit is contained in:
@@ -3,7 +3,7 @@
|
|||||||
WEB=$1
|
WEB=$1
|
||||||
TMP=.status.tmp
|
TMP=.status.tmp
|
||||||
|
|
||||||
wget -qO $TMP $WEB
|
curl -m 10 -s -o $TMP $WEB
|
||||||
|
|
||||||
STATUS=$(grep "Termination Status" $TMP | perl -pe "s/.*\<dd\>(.+)\<.*/\1/"
|
STATUS=$(grep "Termination Status" $TMP | perl -pe "s/.*\<dd\>(.+)\<.*/\1/"
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
CURDIR=$(dirname "$(readlink -f "$0")")
|
CURDIR=$(dirname "$(readlink -f "$0")")
|
||||||
source "$CURDIR"/shared-functions.so
|
source "$CURDIR"/shared-functions.so
|
||||||
|
|
||||||
IP=$(wget -T 5 -t 2 -q -O - $IPSERV4)
|
IP=$(curl -m 10 -s -o - $IPSERV4)
|
||||||
EXIT="$?"
|
EXIT="$?"
|
||||||
|
|
||||||
if [ "$var_conn" == "on" ]; then
|
if [ "$var_conn" == "on" ]; then
|
||||||
@@ -25,7 +25,7 @@ if [ "$var_conn" == "on" ]; then
|
|||||||
|
|
||||||
# If request was successful, try IPv6 as well
|
# If request was successful, try IPv6 as well
|
||||||
if [ "$EXIT" != "fail" ]; then
|
if [ "$EXIT" != "fail" ]; then
|
||||||
IP6=$(wget -T 5 -t 2 -q -O - $IPSERV6)
|
IP6=$(curl -m 10 -s -o - $IPSERV6)
|
||||||
EXIT="$?"
|
EXIT="$?"
|
||||||
if ([ "$EXIT" == 4 ] || [ "$EXIT" == 6 ] || [ "$EXIT" == 28 ]); then
|
if ([ "$EXIT" == 4 ] || [ "$EXIT" == 6 ] || [ "$EXIT" == 28 ]); then
|
||||||
TEXT="t/o"
|
TEXT="t/o"
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ TOOL="$TOOL;conn=$var_conn"
|
|||||||
function check_mailqueue {
|
function check_mailqueue {
|
||||||
QUEUE=$($MSMTP_LIST | grep -o "^From: " | wc -l)
|
QUEUE=$($MSMTP_LIST | grep -o "^From: " | wc -l)
|
||||||
OUT="$OUT;mq=$QUEUE"
|
OUT="$OUT;mq=$QUEUE"
|
||||||
|
|
||||||
# If $QUEUE > 0 and >10 runs, show notification
|
# If $QUEUE > 0 and >10 runs, show notification
|
||||||
if [ "$QUEUE" -gt 0 ]; then
|
if [ "$QUEUE" -gt 0 ]; then
|
||||||
var_mailqueue_runs=$(($var_mailqueue_runs + 1))
|
var_mailqueue_runs=$(($var_mailqueue_runs + 1))
|
||||||
@@ -32,13 +32,13 @@ function check_mailqueue {
|
|||||||
if [ "$QUEUE" -gt 0 ] && [ "$var_mailqueue_runs" -gt 9 ]; then
|
if [ "$QUEUE" -gt 0 ] && [ "$var_mailqueue_runs" -gt 9 ]; then
|
||||||
notify-send "There are mails in the mailqueue. Remember sending them manually or switch online status."
|
notify-send "There are mails in the mailqueue. Remember sending them manually or switch online status."
|
||||||
var_mailqueue_runs=0 # reset counter
|
var_mailqueue_runs=0 # reset counter
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# SVN STATUS
|
# SVN STATUS
|
||||||
function check_svn {
|
function check_svn {
|
||||||
if isonline; then
|
if isonline; then
|
||||||
STATUS=$(wget -T 5 -q -O - $SVNSTATUS)
|
STATUS=$(curl -m 5 -s -o - $SVNSTATUS)
|
||||||
EXIT="$?"
|
EXIT="$?"
|
||||||
if ([ "$EXIT" == 4 ] || [ "$EXIT" == 6 ] || [ "$EXIT" == 28 ]); then
|
if ([ "$EXIT" == 4 ] || [ "$EXIT" == 6 ] || [ "$EXIT" == 28 ]); then
|
||||||
SVN="t/o"
|
SVN="t/o"
|
||||||
|
|||||||
Reference in New Issue
Block a user