sign inHome | Recent Changes | All Pages | HelpSearch:

WhatsMyPorts

You can put the following in your .bash_profile:


# planet argon general purpose digits:
PORTDIGITS=$(printf '%03d' $(($UID % 1000)))
# 2036 => '036', octal when numeric

declare -i portvalue
portvalue=$(($UID % 1000))
# 2036 => 36, decimal number

# PostgreSQL Port
export PGPORT=$((5400 + $portvalue))

export POUNDPORT=$((8000 + $portvalue))
export MONGPORT0=1${PORTDIGITS}0
export MONGPORT1=1${PORTDIGITS}1


Powered by JunebugWiki v0.0.28 Last edited by vu2046 on January 17, 2008 03:40 PM (diff)
Version 4 (current) «olderversions