Browse Source

Formalizing hastebin and fixing a missing quote and slash

CedarLUG 9 years ago
parent
commit
f88f3d27cf
1 changed files with 4 additions and 4 deletions
  1. 4 4
      lgsm/functions/command_postdetails.sh

+ 4 - 4
lgsm/functions/command_postdetails.sh

@@ -20,7 +20,7 @@ POSTDETAILS=yes
 # Another reason for an alternative here is that pastebin limits guest
 # Another reason for an alternative here is that pastebin limits guest
 # posts to 10 per day, which might be a tight limit for some debugging situations.
 # posts to 10 per day, which might be a tight limit for some debugging situations.
  
  
-POSTTARGET="http://pastebin.com"
+POSTTARGET="http://hastebin.com"
 POSTEXPIRE="1W" # use 1 week as the default, other options are '24h' for a day, etc.
 POSTEXPIRE="1W" # use 1 week as the default, other options are '24h' for a day, etc.
 
 
 # This file sources the command_details.sh file to leverage all
 # This file sources the command_details.sh file to leverage all
@@ -121,13 +121,13 @@ if [ "$POSTTARGET" == "http://pastebin.com" ] ; then
 	       awk '/^location: / { print $2 }' | sed "s/\n//g")
 	       awk '/^location: / { print $2 }' | sed "s/\n//g")
 
 
    # Output the resulting link.
    # Output the resulting link.
-   fn_print_warn_nl "You now need to visit (and verify) the content posted at ${POSTTARGET}${link}"
+   fn_print_warn_nl "Visit (and verify) the content posted at ${POSTTARGET}${link}"
 elif [ "$POSTTARGET" == "http://hastebin.com" ] ; then
 elif [ "$POSTTARGET" == "http://hastebin.com" ] ; then
    # hastebin is a bit simpler.  If successful, the returned result
    # hastebin is a bit simpler.  If successful, the returned result
    # should look like: {"something":"key"}, putting the reference that
    # should look like: {"something":"key"}, putting the reference that
    # we need in "key".  TODO - error handling. -CedarLUG
    # we need in "key".  TODO - error handling. -CedarLUG
-   link=$(curl -s -d "$(<${tmpfile}) | cut -d\" -f4)
-   fn_print_warn_nl "You now need to visit (and verify) the content posted at ${POSTTARGET}${link}"
+   link=$(curl -s -d "$(<${tmpfile})" ${POSTTARGET}/documents| cut -d\" -f4)
+   fn_print_warn_nl "Visit (and verify) the content posted at ${POSTTARGET}/${link}"
 fi
 fi
 
 
 # cleanup
 # cleanup