packrat Posted February 2, 2006 Report Share Posted February 2, 2006 I've been playing with the Uniform Server, and it's working great so far. I do have a question, though. Is there a method for automatically starting STunnel when the server starts? I'd like to have it start up right away without having to go to the "plugins/Stunnel-4.05/index.html" page and clicking on the cgi link. Quote Link to comment Share on other sites More sharing options...
olajideolaolorun Posted February 3, 2006 Report Share Posted February 3, 2006 Sorry, not yet.... unless you have knowledge of BATCH Scripting.... ...gotta run Quote Best Regards Olajide Olaolorun The Uniform Server Development Team Link to comment Share on other sites More sharing options...
packrat Posted February 4, 2006 Author Report Share Posted February 4, 2006 I'd hoped there was an easy way. But, after some playing with the batch files, I've gotten it to work by modifying the Server_Start.bat file. I've also re-arranged it a bit, mainly to make it easier for me to tell what I was doing. I also added a line to the Close.bat file to shut down STunnel when the server shuts down. I'll post them here in case anyone is interested. new_server_start.bat : Batch file to start the Uniform Server with STunnel : Author: packrat : Based on 'Server_Start.bat' by The Uniform Server Development Team @echo off rem use: start <driveletter> mysql console - to start mysql at server start and display console rem use: start <driveletter> mysql - to start mysql at server start rem use: start <driveletter> nomysql console - to display console rem Check to see if Apache is already started diskw\home\admin\program\pskill Apache.exe IF NOT ERRORLEVEL 1 goto started rem Create the virtual drive set Disk=%1 IF "%Disk%"=="" set Disk=w subst %Disk%: "diskw" IF ERRORLEVEL 1 goto hint rem Set some useful variables set apachepath=\usr\local\apache2\ set apachecommand=%Disk%:%apachepath%bin\Apache.exe -f %apachepath%conf\httpd.conf -d %apachepath%. set programpath=%Disk%:\home\admin\program\ set closecommand=%programpath%close.bat %Disk% set www=\www\ set apanel=\home\admin\www\ rem Uncomment this line if you're using STunnel set stunnelpath=%Disk%:\home\admin\Www\plugins\Stunnel-4.05\bin\ %Disk%: cd \usr\local\php IF "%2"=="mysql" goto mysql :startserver rem Uncomment this line if you're using STunnel start %stunnelpath%stunnel-4.05 %stunnelpath%ssltunel.conf echo The server is working on the disk %Disk%:\ [http/127.0.0.1/apanel/] start %Disk%:%apanel%redirect.html if "%3"=="console" goto console start %programpath%uniserv.exe "%apachecommand%" "%closecommand%" goto end :started echo Error: Apache is already started. Use 'Stop.bat' goto end :hint echo The drive letter %Disk% is already in use. Use 'Disk Start.vbs' [driveletter] goto end :console %apachecommand% %closecommand% goto end :mysql rem %Disk%: rem cd \usr\local\php start \usr\local\mysql\bin\mysqld-opt.exe --defaults-file=/usr/local/mysql/bin/my-small.cnf goto startserver :end Close.bat @echo off set Disk=%1 IF "%Disk%"=="" set Disk=w %Disk%:\home\admin\program\pskill.exe mysqld-opt.exe IF ERRORLEVEL 1 goto nomysql %Disk%:\usr\local\mysql\bin\mysqladmin.exe --character-sets-dir="/usr/local/mysql/share/charsets/" --user=root --password=root shutdown :nomysql rem Shut down STunnel if it's running %Disk%:\home\admin\program\pskill.exe stunnel-4.05.exe c subst %Disk%: /D Quote Link to comment Share on other sites More sharing options...
olajideolaolorun Posted February 8, 2006 Report Share Posted February 8, 2006 This was what i hopped you would do.. didn't have time and it doesn't hurt to learn new things... thats how i got started in Quote Best Regards Olajide Olaolorun The Uniform Server Development Team Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.