Skip to content

Commit

Permalink
bugfix di main script
Browse files Browse the repository at this point in the history
  • Loading branch information
gojigeje committed Feb 22, 2015
1 parent de1239a commit 78939a1
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions tweet.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
#!/bin/bash
# -------------------------------------------------------------------------

# cd to script's directory
# siap-siap
CURL_CA_BUNDLE=/root/cacert.pem
certificate="/root/cacert.pem"
ua="Mozilla/5.0 (X11; Linux i686) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.93 Safari/537.36"

# change directory to script's directory
DIR="$( cd "$( dirname "$0" )" && pwd )"
cd "$DIR"
#rm temp/*_output

setup() {
hari=$(date +%u)
Expand Down Expand Up @@ -50,11 +56,14 @@ cekonline() {
}

post_tweet() {
# persiapan:
# sebelumnya script twit.py sudah di link ke /usr/bin/twit , chmod +x
if [[ ! -z "$tweet_status" ]]; then
getJam
echo "[ttytter][$getjam] : $tweet_status"
echo "$tweet_status" | ttytter -status=-
cekposting
echo "[twit][$getjam] : $tweet_status"
twit -s "$tweet_status"
# echo "$tweet_status" | ttytter -status=-
#cekposting
else
echo "ERROR_STATUS_KOSONG: $aksi"
fi
Expand Down

0 comments on commit 78939a1

Please sign in to comment.