pkg_apply_save() { . /mod/etc/conf/openvpn.cfg if [ "$OPENVPN_CONFIG_COUNT" -gt 1 ]; then /mod/etc/default.openvpn/openvpn_dynamic_conf changed="${OPENVPN_CONFIG_CHANGED#*#}" for d in $(echo "openvpn${OPENVPN_CONFIG_NAMES#*DEFAULT#}" | sed 's/#/ openvpn_/g'); do if [ "${changed%%#*}" == "yes" -a ! -z "$(pidof "$d")" ]; then echo "Change in config of running daemon $d. Restarting ..." "/mod/etc/init.d/rc.$d" restart ; fi changed=${changed#*#} done else rm -f /mod/etc/openvpn_multid.pkg ; [ $(ls /mod/etc/init.d/rc.openvpn* | wc -l) -eq 1 ] || /mod/etc/default.openvpn/openvpn_dynamic_conf start_stop openvpn "$oldstatus1" fi ; } pkg_apply_def() { [ $(ls /mod/etc/init.d/rc.openvpn* | wc -l) -eq 1 ] || /mod/etc/default.openvpn/openvpn_dynamic_conf start_stop openvpn "$oldstatus1" } apply_changes() { :; }