خرید بک لینک

With my OpenVPN configuration, there is a update-resolv-conf file that is included in /etc/openvpn (this is not the same file as the system-wide update-resolv-conf).

The file is used with OpenVPN's up and down clauses in its configuration file.

I would like to stop/start a service using systemctl when update-resolv-conf is up and down, respectively:

  up)
  #lines redacted here for brevity
        echo -n "$R" | /sbin/resolvconf -a "${dev}.openvpn"
        #I have added the two lines below
        sleep 60 # <--
        /bin/systemctl start route_up.service # <--
        ;;
  down)
        /sbin/resolvconf -d "${dev}.openvpn"
        #I have added the line below
        /bin/systemctl stop route_up.service # <--
        ;;

esac

Note that the above is just a snippet of update-resolv-conf that contains my three added lines.

However, this causes something in the VPN routing to fail. I can't access Inteet. Only when I revert back to normal by removing the three lines does it work. Why is this?

برچسب: نویسنده: استخدام کار تاريخ: پنجشنبه 2 ارديبهشت 1395 ساعت: 3:22

صفحه بندی