forked from Spark/ssm-services
		
	checking for the tun module
This commit is contained in:
		| @@ -24,7 +24,18 @@ cjdroute.destroy_tun() { | ||||
| 	ip tuntap del mode tun "$cjdroute_tun_interface" | ||||
| } | ||||
|  | ||||
| cjdroute.check_tun_module() { | ||||
| 	[[ -e '/dev/net/tun' ]] || { | ||||
| 		modprobe tun || { | ||||
| 			watchman.err "Could not load module tun!" | ||||
| 			return 1 | ||||
| 		} | ||||
| 	} | ||||
| } | ||||
|  | ||||
| start() { | ||||
| 	cjdroute.check_tun_module || { return 1; } | ||||
| 	 | ||||
| 	[[ "$service_username" ]] && { | ||||
| 		cjdroute.create_tun || { return 1; } | ||||
| 	} | ||||
|   | ||||
		Reference in New Issue
	
	Block a user