From 26dc11c6c5f6ba6584bd273f5cd93ae527a0a383 Mon Sep 17 00:00:00 2001 From: pacien Date: Thu, 7 Sep 2017 10:00:06 +0200 Subject: Revert "Use paste.gnugen.ch service"; Update endpoint This reverts commit c1db63cc6bd47d9d902382d57efd8ddf35a2cb95. --- post-screenshot.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/post-screenshot.sh b/post-screenshot.sh index a4ee752..7592665 100755 --- a/post-screenshot.sh +++ b/post-screenshot.sh @@ -1,8 +1,8 @@ #!/usr/bin/env sh LOCAL_DIR="$HOME/pictures/screenshots" -REMOTE_SERVICE_URL="https://paste.gnugen.ch" -PASTE_EXPIRATION="1d" +REMOTE_DIR="nas.lsn:/home/pacien/www/net.pacien.files/screenshots" +BASE_URL="https://files.pacien.net/screenshots" TS=$(date +"%s") RAND=$(shuf -i 1000-9999 -n 1) @@ -13,9 +13,10 @@ FILE="$LOCAL_DIR/$FILE_NAME" scrot "$FILE" -s viewnior "$FILE" & -SCREENSHOT_URL=$(curl -F "file=@$FILE;type=image/png" -F "expire=$PASTE_EXPIRATION" -H "Expect:" "$REMOTE_SERVICE_URL") +scp "$FILE" "$REMOTE_DIR/" if [ $? -eq 0 ]; then + SCREENSHOT_URL="$BASE_URL/$FILE_NAME" notify-send --category=transfer.complete "Screenshot upload complete." "$SCREENSHOT_URL" echo -n "$SCREENSHOT_URL" | xclip -i else -- cgit v1.2.3