#!/bin/sh

. /opt/etc/globals

if [ -z "${ovpn_configs}" ]; then
	exit;
fi

for ovpn_config in ${ovpn_configs}; do
	get_pid_by_arg $ovpn_config; OVPN_PID=$?
	if [ $OVPN_PID -eq 0 ]; then
		echo "$0: starting openvpn with config == $ovpn_config"
		$ovpn $ovpn_config
	fi
done
