#!/bin/sh

# Handle connecting to OpenVPN using credentials from a file

FILEPATH="$HOME/Documents/vpn_creds.txt"

get_line()
{
    FOUND=$(find $FILEPATH -exec grep "$1" {} \;)
    echo $FOUND
    return $FOUND
}

USERNAME=$(get_line "username")
PASSWORD=$(get_line "password")

echo $USERNAME