Simple shell script

Nils Kassube kassube at gmx.net
Sun Oct 7 12:16:47 UTC 2007


OOzy Pal wrote:
> Dears,
>
> I have the following script to start webmin and it sync'ed between my
> laptop and desktop. How can I make the script detected if it is
> running in the laptop or desktop. For example
>
> Original Script
> sudo /etc/webmin/start
> firefox -new-tab http://laptop:10000/
>
> Modified Script
> sudo /etc/webmin/start
> firefox -new-tab http://{HOST}:10000/

sudo /etc/webmin/start
if test "$HOSTNAME" = "laptop";then
  firefox -new-tab http://laptop:10000/
else
  firefox -new-tab http://{HOST}:10000/
fi


Nils




More information about the ubuntu-users mailing list