FileZilla Server3: Batch Files

Revision as of 08:16, 24 November 2010 by Olajideolaolorun (talk | contribs) (Reverted edits by Upazixorys (Talk); changed back to last version by Ric)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Uniform Server 5-Nano
FileZilla FTPd (Server).

Batch Files

If you intend to run Uniform Server and FileZilla together independent control can be inconvenient. This page looks at combining server control to run both servers at the same time.

Folder UniServer contains three batch files fz_admin.bat, fz_start.bat and fz_stop.bat These can be deleted however it’s probably worth keeping fz_admin.bat this will allow FileZilla admin to be restarted if accidentally closed.

Uniform Server can be controlled from batch files contained in folder alternative_control these files are easily modified to control both servers.

Remainder of this page looks at modifications required.

Top

Portable – Standard program

Portable mode requires FileZilla’s configuration file to have absolute paths rewritten hence fzp_start.bat will be used.

Edit file Start_Server.bat

Add the last two lines as shown below:

..\usr\local\php\php.exe -n  ..\unicon\main\start_servers.php

start ..\filezilla_server\portable\fzp_start.bat
..\filezilla_server\filezilla_ftpd\zilla_admin.bat 

Edit file Stop_Server.bat

Add the last line as shown below:

..\usr\local\php\php.exe -n  ..\unicon\main\stop_servers.php
start ..\filezilla_server\filezilla_ftpd\zilla_stop.bat

The above two batch files start and stop both servers these are run as a standard program.

Note: You need to manually close FileZilla Admin

Move batch files

It may be more confinement to copy Start_Server.bat and Stop_Server.bat to folder UniServer this keeps all server control in a single folder.

Having copied files to folder UniServer edit each file to have all paths reflect new location as follows:

Edit file Start_Server.bat

usr\local\php\php.exe -n  unicon\main\start_servers.php

start filezilla_server\portable\fzp_start.bat
filezilla_server\filezilla_ftpd\zilla_admin.bat 

Edit file Stop_Server.bat

usr\local\php\php.exe -n  unicon\main\stop_servers.php
start filezilla_server\filezilla_ftpd\zilla_stop.bat


Top

Static – Standard program

Static operation does not rewrite paths in FileZilla’s configuration file. Configuration is identical to the above with one exception file fzp_start.bat is replaced with zilla_start.bat

Edit file Start_Server.bat

Add the last two lines as shown below:

..\usr\local\php\php.exe -n  ..\unicon\main\start_servers.php

start ..\filezilla_server\filezilla_ftpd\zilla_start.bat
..\filezilla_server\filezilla_ftpd\zilla_admin.bat 

Edit file Stop_Server.bat

Add the last line as shown below:

..\usr\local\php\php.exe -n  ..\unicon\main\stop_servers.php
start ..\filezilla_server\filezilla_ftpd\zilla_stop.bat

The above two batch files start and stop both servers these are run as a standard program.

Note: You need to manually close FileZilla Admin

Move batch files

It may be more confinement to copy Start_Server.bat and Stop_Server.bat to folder UniServer this keeps all server control in a single folder.

Having copied files to folder UniServer edit each file to have all paths reflect new location as follows:

Edit file Start_Server.bat

usr\local\php\php.exe -n  unicon\main\start_servers.php

start filezilla_server\portable\fzp_start.bat
filezilla_server\filezilla_ftpd\zilla_admin.bat 

Edit file Stop_Server.bat

usr\local\php\php.exe -n  unicon\main\stop_servers.php
start filezilla_server\filezilla_ftpd\zilla_stop.bat

Top

Static – Service

Running, as a service is similar to the above only difference is service batch files are run. Configuration as follows:

Edit file Service_Install_Run.bat

Add the last two lines as shown below:

..\usr\local\php\php.exe -n  ..\unicon\main\service_install_run.php

..\filezilla_server\filezilla_ftpd\zilla_service_start.bat
..\filezilla_server\filezilla_ftpd\zilla_admin.bat

Edit file Service_Stop_Uninstall.bat

Add the last line as shown below:

..\usr\local\php\php.exe -n  ..\unicon\main\service_stop_uninstall.php

..\filezilla_server\filezilla_ftpd\zilla_service_stop.bat

The above two batch files install/start and stop/uninstalls both server services.

Note: You need to manually close FileZilla Admin

Move batch files

It may be more confinement to copy Service_Install_Run.bat and Service_Stop_Uninstall.bat to folder UniServer this keeps all server control in a single folder.

Having copied files to folder UniServer edit each file to have all paths reflect new location as follows:

Edit file Service_Install_Run.bat

usr\local\php\php.exe -n  unicon\main\service_install_run.php

filezilla_server\filezilla_ftpd\zilla_service_start.bat
filezilla_server\filezilla_ftpd\zilla_admin.bat

Edit file Service_Stop_Uninstall.bat

usr\local\php\php.exe -n  unicon\main\service_stop_uninstall.php

filezilla_server\filezilla_ftpd\zilla_service_stop.bat

Top

Summary

Running both servers requires the addition of one or two lines to the control batch files.

A similar approach can be applied to UniTray’s configuration file see next page for details.

Top