summaryrefslogtreecommitdiffstats
path: root/syrep-chub-client
blob: 4f1c6ef1595daf0e2dc5b15a699495658c6c01fa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/bin/sh

# $Id$

USERNAME=""
PASSWORD=""

SOURCE="$1"
if [ -z "$SOURCE" ] ; then
    echo "You need to specify a file to upload" > /dev/stderr
    exit 1
fi

URL="https://seth.intheinter.net/lennart/syrep-chub/upload.cgi"
DATE=$(date '+%Y%m%d%k%M%S')
FNAME="$HOSTNAME-$DATE"

exec curl -u "$USERNAME:$PASSWORD" -f -s -k -T "$SOURCE" "$URL?$FNAME" > /dev/null