diff options
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/up | 10 | ||||
-rwxr-xr-x | bin/ups | 4 |
2 files changed, 3 insertions, 11 deletions
@@ -1,10 +0,0 @@ -#!/bin/bash -# up.khirnov.net 0x0 instance -if [ "$1" ]; then - fpath=$1 -else - fpath="-" -fi - -url=$(curl -sS -E ~/.local/var/up/cert -F "file=@${fpath}" "https://up.khirnov.net/") -[ "${url}" ] && echo "${url}" @@ -16,7 +16,9 @@ try: except ImportError: have_magic = False -server = 'https://ups.khirnov.net/' +progname = os.path.basename(sys.argv[0]) +service = 'up' if progname == 'up' else 'ups' +server = 'https://%s.khirnov.net/' % service cert_path = os.path.expanduser('~/.local/var/up/cert') parser = argparse.ArgumentParser() |