[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [cobalt-users] Command to fetch the sitenumber based on domain?



> 1) Do RAQ's have a command which fetches the a site's number based on
> domain?
>
> Example:
>
> % sitenum www.domain.com
> >>site6

Not that I'm aware of. However, do an ls -l in /home/sites and you'll see
that www.domain.com is a symbolic link to a directory /home/sites/site6. You
could write a script to determine it from that.

> 2) Is there a command that returns the site number of the site you are
> currently logged in (telnet) as?

You could write a script to do it.
Try:
grep $USER /etc/passwd
for ideas. Note the home directory will be something like
/home/sites/site6/username.