summaryrefslogtreecommitdiffstats
path: root/syrep-chub-client
blob: 483cb73e91b3c1aa5faf39a89c8aa9e3a8a6f92a (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%H%M%S')
FNAME="$HOSTNAME-$DATE"

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