Merge branch 'master' of github.com:mbirth/UnixTools
This commit is contained in:
@@ -16,3 +16,10 @@ RUNTASTIC_PUSHOVER_TOKEN="0123456...PushOver App Token...6789abcdef"
|
||||
# Login for packtclaim.py
|
||||
PACKT_LOGIN = anon@example.org
|
||||
PACKT_PASSWORD = 1234567
|
||||
|
||||
# WunderCam Proxy
|
||||
SNAPSHOT_URL="http://my-ip-camera.com/tmpfs/snap.jpg"
|
||||
SNAPSHOT_USERNAME="guest"
|
||||
SNAPSHOT_PASSWORD="password"
|
||||
WUNDERCAM_USERNAME="mypersonalCAM1"
|
||||
WUNDERCAM_PASSWORD="secretpassword"
|
||||
|
||||
27
glances.conf
27
glances.conf
@@ -164,24 +164,27 @@ mem_critical=90
|
||||
list_1_description=Apache2
|
||||
list_1_regex=.*apache2.*
|
||||
list_1_countmin=1
|
||||
list_2_description=MariaDB
|
||||
list_2_regex=.*mysqld.*
|
||||
list_2_description=Caddy
|
||||
list_2_regex=.*caddy.*
|
||||
list_2_countmin=1
|
||||
list_3_description=OpenFire
|
||||
list_3_regex=.*openfire.*
|
||||
list_3_description=MariaDB
|
||||
list_3_regex=.*mysqld.*
|
||||
list_3_countmin=1
|
||||
list_4_description=Flightradar24
|
||||
list_4_regex=.*fr24feed.*
|
||||
list_4_countmin=1
|
||||
list_5_description=SubSonic
|
||||
list_5_regex=.*subsonic.*
|
||||
list_5_description=Dump1090
|
||||
list_5_regex=.*dump1090.*
|
||||
list_5_countmin=1
|
||||
list_6_description=SabNZBd+
|
||||
list_6_regex=.*sabnzbd.*
|
||||
list_6_countmin=1
|
||||
list_7_description=NewzNab
|
||||
list_7_regex=.*newznab.*
|
||||
list_7_countmin=1
|
||||
#list_5_description=OpenFire
|
||||
#list_5_regex=.*openfire.*
|
||||
#list_5_countmin=1
|
||||
#list_6_description=SabNZBd+
|
||||
#list_6_regex=.*sabnzbd.*
|
||||
#list_6_countmin=1
|
||||
#list_7_description=NewzNab
|
||||
#list_7_regex=.*newznab.*
|
||||
#list_7_countmin=1
|
||||
#list_10_description=NFSd
|
||||
#list_10_regex=.*nfs.*
|
||||
#list_10_countmin=1
|
||||
|
||||
@@ -31,9 +31,13 @@ g.doc.submit()
|
||||
g.doc.save('/tmp/free-learning-after-login.html')
|
||||
g.doc.text_assert('"sid":')
|
||||
g.doc.text_assert('Claim Your Free eBook')
|
||||
claim_book = g.doc.select('//div[@class="dotd-title"]/h2').text()
|
||||
print("Book: {}".format(claim_book))
|
||||
claim_url = g.doc.select('//a[@class="twelve-days-claim"]/@href').text()
|
||||
print("Claim URL: " + claim_url)
|
||||
print("Claim URL: {}".format(claim_url))
|
||||
g.go(claim_url)
|
||||
g.doc.save('/tmp/free-learning-after-claim.html')
|
||||
g.doc.text_assert('<h1>My eBooks </h1>')
|
||||
print("Claim successful.")
|
||||
last_claimed_title = g.doc.select('(//div[@id="product-account-list"]/div)[1]/@title').text()
|
||||
print("Last claimed book: {}".format(last_claimed_title))
|
||||
|
||||
17
wundercam_proxy.sh
Executable file
17
wundercam_proxy.sh
Executable file
@@ -0,0 +1,17 @@
|
||||
#!/bin/sh
|
||||
|
||||
HERE=`dirname $0`
|
||||
|
||||
. $HERE/CONFIG
|
||||
|
||||
WUNDERCAM_URL="ftp://webcam.wunderground.com/image.jpg"
|
||||
TMPFILE=`tempfile -p "snap" -s ".jpg"`
|
||||
|
||||
curl -v -u "$SNAPSHOT_USERNAME:$SNAPSHOT_PASSWORD" $SNAPSHOT_URL -o "$TMPFILE"
|
||||
if [ $? -eq 0 ]; then
|
||||
curl -v -T "$TMPFILE" --ftp-pasv -u "$WUNDERCAM_USERNAME:$WUNDERCAM_PASSWORD" $WUNDERCAM_URL
|
||||
else
|
||||
echo "ERROR: Problem while downloading $SNAPSHOT_URL." 1>&2
|
||||
fi
|
||||
|
||||
find /tmp -maxdepth 1 -type f -name "snap*.jpg" -mmin +120 -delete
|
||||
Reference in New Issue
Block a user