mirror of
				https://github.com/kenzok8/openwrt-packages.git
				synced 2025-10-30 07:50:37 +08:00 
			
		
		
		
	update 2022-04-11 16:22:56
This commit is contained in:
		
							
								
								
									
										30
									
								
								luci-app-clash/root/usr/share/clash/create/rules.sh
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										30
									
								
								luci-app-clash/root/usr/share/clash/create/rules.sh
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,30 @@ | ||||
| #!/bin/sh /etc/rc.common | ||||
| . /lib/functions.sh | ||||
| rules_set() | ||||
| { | ||||
|  | ||||
|    CFG_FILE="/etc/config/clash" | ||||
|    local section="$1" | ||||
|    config_get "type" "$section" "type" "" | ||||
|    config_get "rulename" "$section" "rulename" "" | ||||
|    config_get "rulenamee" "$section" "rulenamee" "" | ||||
|  | ||||
|    if [ -z "$type" ]; then | ||||
|       return | ||||
|    fi | ||||
|     | ||||
|     | ||||
|    if [ -z "$rulename" ]; then | ||||
|       uci set clash."$section".rulename="$rulenamee" | ||||
|       uci commit clash | ||||
|    fi | ||||
| 	   | ||||
|  | ||||
| } | ||||
|  | ||||
| start(){ | ||||
|    config_load "clash" | ||||
|    config_foreach rules_set "rules" | ||||
| } | ||||
|  | ||||
| start | ||||
		Reference in New Issue
	
	Block a user
	![41898282+github-actions[bot]@users.noreply.github.com](/assets/img/avatar_default.png) github-actions[bot]
					github-actions[bot]