Skip to content

Instantly share code, notes, and snippets.

@dbiesecke
Created March 28, 2024 13:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dbiesecke/f5aee99d011aec62e8bb8e57bf83f479 to your computer and use it in GitHub Desktop.
Save dbiesecke/f5aee99d011aec62e8bb8e57bf83f479 to your computer and use it in GitHub Desktop.
Check usenet accounts for upload
#/bin/bash
#
#
# % ~/bin/check_usenet_upload "xsnews.nl xsn PASSS"
#
#
#
# 'https://github.com/mbruel/ngPost/releases/download/v4.14/ngPost_v4.14_cmd-x86_64.AppImage'
#
# curl 'https://github.com/mbruel/ngPost/releases/download/v4.14/ngPost_v4.14_cmd-x86_64.AppImage' > ~/bin/ngPost && chmod +x ~/bin/ngPost
NG="ngPost"
MYTEST="$1"
MYCMD=$( echo "$MYTEST" | awk '{print "ngPost -t 1 -h news."$1" -P 443 -s -u "$2" -p \""$3"\" -n 30 -f ngPost@nowhere.com -g alt.binaries.test -a 64000 -i /tmp/folderToPost -o test.nzb"}' )
#echo $MYCMD
mkdir -p /tmp/folderToPost 2>/dev/null
echo 1111111 > /tmp/folderToPost/testing
export NO_RESUME_AUTO=1
MYRES=$($MYCMD)
( $MYCMD > /dev/null && echo "SUCCES $MYTEST" )
rm -fR "/tmp/folderToPost"
test -f test.nzb && rm test.nzb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment