Commit bc2289e5 authored by Janek Bevendorff's avatar Janek Bevendorff

Add OVPN conversion script and fix implicit help

parent 2b053766
......@@ -13,7 +13,8 @@
"betaweb": "High level scripts for betaweb, e.g. hadoop management.",
"elasticsearch": "Helper scripts for managing Elasticsearch on the Betaweb cluster.",
"git": "Helper scripts for working with the Webis Git server and GitLab instance.",
"webis20": "Storage Management Scripts, need direct access to RAID Controller and MegaCLI installed"
"webis20": "Storage Management Scripts, need direct access to RAID Controller and MegaCLI installed",
"openvpn": "Webis OpenVPN tools"
},
"commands_aliases": {
......@@ -21,6 +22,7 @@
"util": ["ut"],
"betamng": ["bm"],
"betaweb": ["bw"],
"elasticsearch": ["es"]
"elasticsearch": ["es"],
"openvpn": ["vpn"]
}
}
#!/usr/bin/env bash
if [ "$1" == "" ]; then
echo "Usage: $(basename $0) pkcs12-file.p12" >&2
exit 1
fi
echo -n "Password: " >&2
read -s pass
cat <<EOL
client
remote vpn.webis.de
dev tun
proto udp
port 1194
user nobody
group nobody
<ca>
$(echo $pass | openssl pkcs12 -in "$1" -passin stdin -cacerts -nodes -nokeys)
</ca>
<cert>
$(echo $pass | openssl pkcs12 -in "$1" -passin stdin -clcerts -nodes -nokeys)
</cert>
<key>
$(echo -e "$pass\n$pass" | openssl pkcs12 -in "$1" -passin stdin -passout stdin -nocerts -aes256)
</key>
EOL
echo >&2
......@@ -208,7 +208,7 @@ def main(args):
argsdict['<command>'] = translate_alias_to_command(
config, argsdict['<command>'])
if len(argsdict) == 2 and argsdict['<subcommand>'] is None:
if argsdict['<subcommand>'] not in allcommands[argsdict['<command>']]:
subparsers[argsdict['<command>']].print_help()
return 0
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment