feat:Android现版本已无法支持inotifyd监视文件变动故删除
This commit is contained in:
@@ -8,7 +8,3 @@ start_proxy () {
|
||||
${MODDIR}/v2ray.tproxy enable &>> /data/v2ray/run/service.log &
|
||||
fi
|
||||
}
|
||||
if [ ! -f /data/v2ray/manual ] ; then
|
||||
start_proxy
|
||||
inotifyd ${MODDIR}/v2ray.inotify ${MODDIR}/.. &>> /data/v2ray/run/service.log &
|
||||
fi
|
||||
|
@@ -1,43 +0,0 @@
|
||||
#!/system/bin/sh
|
||||
|
||||
inotify=`realpath $0`
|
||||
scripts_dir=`dirname ${inotify}`
|
||||
service="${scripts_dir}/v2ray.service"
|
||||
tproxy="${scripts_dir}/v2ray.tproxy"
|
||||
|
||||
events=$1
|
||||
monitor_dir=$2
|
||||
monitor_file=$3
|
||||
|
||||
start_v2ray() {
|
||||
${service} start && \
|
||||
if [ -f /data/v2ray/appid.list ] || [ -f /data/v2ray/softap.list ] ; then
|
||||
${tproxy} enable
|
||||
settings put global airplane_mode_on 1
|
||||
sleep 1
|
||||
am broadcast -a android.intent.action.AIRPLANE_MODE
|
||||
sleep 1
|
||||
settings put global airplane_mode_on 0
|
||||
sleep 1
|
||||
am broadcast -a android.intent.action.AIRPLANE_MODE
|
||||
fi
|
||||
}
|
||||
|
||||
stop_v2ray() {
|
||||
${tproxy} disable
|
||||
${service} stop
|
||||
}
|
||||
|
||||
main() {
|
||||
if [ ! -f /data/v2ray/manual ] ; then
|
||||
if [ "${monitor_file}" = "disable" ] ; then
|
||||
if [ "${events}" = "d" ] ; then
|
||||
start_v2ray
|
||||
elif [ "${events}" = "n" ] ; then
|
||||
stop_v2ray
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
main
|
Reference in New Issue
Block a user