[Xitami] bat file

miplanet xitami@lists.xitami.org
Mon, 5 Aug 2002 19:48:58 -0400


This is a multi-part message in MIME format.

------=_NextPart_000_0000_01C23CB9.23812E00
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: 7bit

Here is my donation, Hope it comes over alright. I'm sure I don't have my
Xitami set up like most people but it is working flawlessly for me. When you
take a look at this create.bat file you will see that my Xitami runs on F:
and all my sites are in a sub-directory called websites. Also I'm probably
putting in extra stuff in my defaults.cfg file that isn't needed but again
it works for me. You do need to have QBasic in your path. I ended up just
putting it in the Xitami directory because that's the only place I'm using
it. This creates the xxxx.com directory or xxxx.net directory in the
websites directory, and 2 sub-directories (control and cgi-bin) in that
directory. It creates a new xxxx.cfg directory and copies a blank xxxx.aut
file. And I update the defaults.cfg file for the redirects to the xxxx.cfg,
which is the last thing in my defaults.cfg file.

If this works for anyone fine if not then don't use it. Of course feel free
to modify it to suit your needs then send me 1 million dollars. (JUST
KIDDING)

My last jab.
You guys need to light up. You are so hard on some of these folks to the
point of being down right mean. (just my two cents) Otherwise this is a very
good forum and I find most of the information I see very useful.

Ron Ackerman
Loyal Xitami User


-----Original Message-----
From: xitami-admin@lists.xitami.org
[mailto:xitami-admin@lists.xitami.org]On Behalf Of bernd hohmann
Sent: Monday, August 05, 2002 8:13 PM
To: xitami@lists.xitami.org
Subject: Re: [Xitami] (no subject)


On Tue, 06 Aug 2002 00:52:34 +0200, TW wrote:

>Has anyone ever created a script of batch file to automagically creat a
site
>>rather than go through the GUI?
>
>huh? what? Very magic. No clue what this question is all about.

it is about generating a script which generates a config file for this
new virtual host and adds this host to the default.cfg

not a serious job for a programmer, especially when you shrinked down
the config files for each VHost.

i'm only using a small rexx file to create the directory structure
which our system needs and copy, paste & change the few lines needed
for each new domain with an editor.

the xitami admin console is a masterpiece of work but since i worked
with xitami before thit feature existed there are a lot of thinks in
the files which aren't compatible to the Admin console.

bernd



--
Xitami Users Mailing List -- For Xitami support
To unsubscribe: http://lists.xitami.org/mailman/listinfo/xitami

------=_NextPart_000_0000_01C23CB9.23812E00
Content-Type: application/octet-stream;
	name="create.bat"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
	filename="create.bat"




@echo off=20

rem --- QBasic is required for this batch file to work. I put it in my =
Xitami directory. ---
rem --- I'm sure that this can be done better but it works for me. ----

rem --- This area sets up the user input variables, IP, Site name and =
domain extension. ----

echo OPEN "~usrin.bat" FOR OUTPUT AS #1> ~usrin.bas
echo OPEN "~tcpip.bat" FOR OUTPUT AS #2> ~tcpip.bas
echo OPEN "~ext.bat" FOR OUTPUT AS #3> ~ext.bas
echo INPUT "Enter website  ", sUsrin$>> ~usrin.bas
echo INPUT "Enter TCPIP for this site  ", sTcpip$>> ~tcpip.bas
echo INPUT "Is this a com or a net  ", sExt$>> ~ext.bas
echo PRINT #1, "set usrin=3D"; sUsrin$>> ~usrin.bas=20
echo PRINT #2, "set tcpip=3D"; sTcpip$>> ~tcpip.bas
echo PRINT #3, "set ext=3D"; sExt$>> ~ext.bas
echo CLOSE #1>> ~usrin.bas=20
echo CLOSE #2>> ~tcpip.bas
echo CLOSE #3>> ~ext.bas
echo SYSTEM>> ~usrin.bas=20
echo SYSTEM>> ~tcpip.bas
echo SYSTEM>> ~ext.bas
qbasic /run ~usrin.bas=20
qbasic /run ~tcpip.bas
qbasic /run ~ext.bas
call ~usrin.bat=20
call ~tcpip.bat
call ~ext.bat
del ~usrin.bat=20
del ~usrin.bas=20
del ~tcpip.bat
del ~tcpip.bas
del ~ext.bat
del ~ext.bas
echo Creating website %usrin%.%ext on IP %tcpip%=20

rem ----This opens up defaults.cfg and updates IP and cfg area. ----

echo open "defaults.cfg
echo     %tcpip% =3D "%usrin%.cfg">> defaults.cfg
echo     %usrin%.%ext% =3D "%usrin%.cfg">> defaults.cfg
echo     www.%usrin%.%ext% =3D "%usrin%.cfg">> defaults.cfg

rem --- This copies a new .cfg file and updates it with the new =
information. ----
rem --- Change the path as required.

copy f:\xitami\new.cfg f:\xitami\%usrin%.cfg=20
echo open "%usrin%.cfg
echo #*END>> %usrin%.cfg
echo [Accesslog]>> %usrin%.cfg
echo    Filename =3D "%usrin%.log">> %usrin%.cfg
echo [Ftp]>> %usrin%.cfg
echo    Root =3D "websites/%usrin%.%ext%/">> %usrin%.cfg
echo [Security]>> %usrin%.cfg
echo    Filename =3D "%usrin%.aut">> %usrin%.cfg
echo    Superuser =3D "">> %usrin%.cfg
echo [Server]>> %usrin%.cfg
echo    Default2 =3D "index.html">> %usrin%.cfg
echo    Default3 =3D "default.htm">> %usrin%.cfg
echo    Webpages =3D "websites/%usrin%.%ext%/">> %usrin%.cfg
echo    Cgi-bin =3D "websites/%usrin%.%ext%/cgi-bin">> %usrin%.cfg
echo [Wsx]>> %usrin%.cfg
echo    Admin =3D "">> %usrin%.cfg

rem --- This creates the new directories ----
rem --- Change the paths as required. ---


md f:\xitami\websites\%usrin%.%ext%
md f:\xitami\websites\%usrin%.%ext%\cgi-bin
md f:\xitami\websites\%usrin%.%ext%\control

rem --- This copies over a new aut file for the site. ----

copy f:\xitami\new.aut f:\xitami\%usrin%.aut


:end

------=_NextPart_000_0000_01C23CB9.23812E00--