Branch: Tag:

2002-02-14

2002-02-14 15:22:19 by Marcus Wellhardh <wellhard@roxen.com>

Added mysql environment plugin.

Rev: server/etc/env.d/mysql.pike:1.1

1:    + void run(object env) + { +  write("\n Configuring port number for external access to the internal\n" +  " MySQL database (leave empty for no external access).\n\n"); +  +  Stdio.File infd = Stdio.stdin, outfd = Stdio.stdout; +  Stdio.Terminfo.Termcap term = Stdio.Terminfo.getTerm(); +  Tools.Install.Readline rl = Tools.Install.Readline(); +  string in = rl->edit(env->get("MYSQL_TCP_PORT")||"", "MySQL port number: "); +  write("\n"); +  sscanf(in, "%d", int port); +  if(port) +  { +  if((string)port != env->get("MYSQL_TCP_PORT")) +  env->set("MYSQL_TCP_PORT", port); +  } +  else +  env->remove("MYSQL_TCP_PORT"); + }   Newline at end of file added.