I was looking for a similar solution, because I needed a serverside Open VPN config for fixed IP numbers. My solution was to add a line to the vpn_openvpn.sh file right before it starts the daemon_mgr in my case line 210.
<snip> usr/bin/openssl verify -CAfile /etc/openvpn/keys/ca.crt /etc/openvpn/keys/myserver.crt 2>/dev/null | /bin/grep "OK" >/dev/null echo client-config-dir clientconfig >>/etc/openvpn/server.conf if [ $? == 0 ] && [ ! -f $ ]; then </snip>
I added the line starting with echo. At this point you should also be able to modify the configuration in /etc/openvpn/server.conf
When added here, the line will survive restarts of the OpenVPN Server but as you already painfully experienced, a lot of files get recreated at boot time. This is where the autorun.sh comes into play. How to use it you can find here The exact syntax is based on the type of QNAP NAS you got.
You can add a sed line here to recreate the "fix" at boot time.
sed "210i echo client-config-dir clientconfig >>/etc/openvpn/server.conf" /etc/init.d/vpn_openvpn.sh >/etc/init.d/vpn_openvpn.sh.tmp rm /etc/init.d/vpn_openvpn.sh mv /etc/init.d/vpn_openvpn.sh.tmp chmod +x /etc/init.d/vpn_openvpn.sh /etc/init.d/vpn_openvpn.sh restart
In your case the autorun.sh should look like this:
sed "210i /bin/sed -i -e 's/client-cert-not-required/#client-cert-not-required/g' /etc/openvpn/server.conf" /etc/init.d/vpn_openvpn.sh >/etc/init.d/vpn_openvpn.sh.tmp rm /etc/init.d/vpn_openvpn.sh mv /etc/init.d/vpn_openvpn.sh.tmp /etc/init.d/vpn_openvpn.sh chmod +x /etc/init.d/vpn_openvpn.sh /etc/init.d/vpn_openvpn.sh restart
Let me know if it works
Edit: after some rethinking you can do it even shorter
sed -i "210i /bin/sed -i -e 's/client-cert-not-required/#client-cert-not-required/g' /etc/openvpn/server.conf" /etc/init.d/vpn_openvpn.sh /etc/init.d/vpn_openvpn.sh restart