#!/bin/sh scriptname=$0 scriptname=${scriptname##*/} prefix=${scriptname%%_conf} CCD_REL=/clients_$prefix CCD=/var/tmp/openvpn$CCD_REL . /mod/etc/conf/${prefix}.cfg CFILE=${1-"/mod/etc/${prefix}.conf"} echo "$OPENVPN_CONF" > $CFILE