11 lines
292 B
Bash
Executable file
11 lines
292 B
Bash
Executable file
#!/bin/sh
|
|
|
|
# Look for ifconfig
|
|
[ -e "/sbin/ifconfig" ] && CMD="/sbin/ifconfig"
|
|
[ -e "$(which ifconfig)" ] && CMD="ifconfig"
|
|
[ -n "$CMD" ] || error "ifconfig not found"
|
|
|
|
# Use ifconfig to get ip address
|
|
ADDR="$($CMD | grep -o '192\.168\.[0-9]*\.[0-9]*' | head -n 1)"
|
|
|
|
php -S "$ADDR":8000 -t .
|