#!/bin/sh

v2ray_enable=$(uci get v2raypro.@v2raypro[0].enabled 2>/dev/null)

if [ $v2ray_enable -eq 1 ]; then
	if pidof v2ray>/dev/null; then
	   /etc/init.d/v2raypro reload_rule
	 else
	   /etc/init.d/v2raypro restart
  fi
fi
