All pastes #590596 Raw Edit

Mine

public text v1 · immutable
#590596 ·published 2007-06-26 17:49 UTC
rendered paste body
 cat dsmod_status 
#!/bin/sh

. /mod/etc/conf/mod.cfg

log=''

[ "$(/mod/etc/init.d/rc.webcfg status)" = "running" ] || \
        log="$(/mod/etc/init.d/rc.webcfg start 2>&1)"

# Try several fallbacks for HTTP_HOST (#3 should work for BusyBox httpd)
[ -z "$HTTP_HOST" ] && HTTP_HOST=$SERVER_NAME
[ -z "$HTTP_HOST" ] && HTTP_HOST=$SERVER_ADDR
[ -z "$HTTP_HOST" ] && HTTP_HOST=$(/bin/hostname)

location="http://$HTTP_HOST:$MOD_HTTPD_PORT/"

cat << EOF
Content-type: text/html; charset=iso-8859-1

<html>
<head>
<meta http-equiv="refresh" content="0;url=$location">
</head>
<body style="margin: 0px: pading: 0px; color: #b0b0b0; font-size: 10px;">
$([ -n "$log" ] && echo "$log<br>")
Redirecting...<a style="color: #b0b0b0;" href="$location">dsmod</a>
</body>
</html>
EOF