Attension: If you just want to run CrossFTP client or server, rather than to install the server as a System Service, please refer to the CrossFTP Server.

 

Download

CrossFTP Server System Service Enhancement Package

Installing a Service

In many cases it makes sense to start server applications as soon as the system is up an running. Therefore, the binary distribution of CrossFTP server was bundled with a precustomized Java Service Wrapper for Windows NT/2000/XP and Linux x86.

Before you install the service/daemon please check the settings by lauching the GUI program of CrossFTP Server, and make sure it configures and works properly. After that, download the service package to enable the system service for the CrossFTP Server.

Running CrossFTP as NT Service

Use a text editor to modify the %CROSSFTP_HOME%/conf/wrapper.conf, change the wrapper.app.parameter.3's value as your user home directory (If you do not know what is your home directory, choose Tools -> Show Home Directory to have a look). For example:

wrapper.app.parameter.3=c:\Documents and Settings\User\ 

In order to install CrossFTP Server as a NT service you have to execute the following batch file:

%CROSSFTP_HOME%/bin/crossftp-install-nt.bat 

If everything went well, CrossFTP Server is started automatically on system start from now on. You can start the service by executing the command

net start CrossFTPServer

You can stop the service by executing the command

net stop CrossFTPServer

The service is uninstalled by executing the script file:

%CROSSFTP_HOME%/bin/crossftp-uninstall-nt.bat

For further documentation refer to the Java Service Wrapper website.

Running CrossFTP as Linux Daemon

The installation process of a daemon varies among linux distributions. The instructions in this document refer to Debian or Ubuntu distributions.

Login as "root" and change into the folder $CROSSFTP_HOME/bin . Make sure the java wrapper script/binary is executable:

chmod 755 wrapper
chmod 755 crossftp.sh

Use a text editor to modify the %CROSSFTP_HOME%/conf/wrapper.conf, change the wrapper.app.parameter.3's value as your user home directory (If you do not know what is your home directory, choose Tools -> Show Home Directory to have a look). For example:

wrapper.app.parameter.3=/home/user/

Open crossftp.sh with a text editor and set the variable CROSSFTP_HOME to the installation folder, example:

CROSSFTP_HOME="/home/user/crossftp" 

Start and stop the FTP server by executing the following commands

./crossftp.sh start 
./crossftp.sh stop 

View the log file $CROSSFTP_HOME/logs/wrapper.log and make sure the application started without errors. If any errors occured you have possibly not installed java or the FTP ports 21 are already bound.

If the daemon started successfully create a soft link in the /etc/init.d folder. Please change the CROSSFTP_HOME's value to the installation directory.

export CROSSFTP_HOME=/home/user/crossftp
ln -s $CROSSFTP_HOME/bin/crossftp.sh /etc/init.d/crossftp 

The registration of daemons at different runlevels is done with update-rc.d . The utility update-rc.d automatically updates the system V style init script links /etc/rc runlevel .d/ NNname to scripts /etc/init.d/ name . The placeholder runlevel is one of the runlevels supported by init (0123456789S). The placeholder NN is the two-digit sequence code used by init to decide which order to run the scripts in. Change into the /etc/init.d folder and issue the following command:

update-rc.d crossftp defaults 

This will make links to start the service in runlevels 2, 3, 4, and 5 and stop the service in runlevels 0, 1, and 6. The default sequence code is 20.

Now restart the system:

shutdown -r now 

In case you wish to uninstall the daemon, just execute

update-rc.d -f crossftp remove
rm -f /etc/init.d/crossftp 

For further documentation refer to the Java Service Wrapper website.