How can I configure my system to run the FingKit as a Service?

Fing Kit requires a configuration file at this location:

  • Windows: “%APPDATA%\Fing\conf\kit.properties”
  • Linux/Unix/OSx: “/etc/fing/kit.properties”

The file is created after the first execution of fing:

enrichment.enabled=true
license=TO_BE_EDITED_WITH_THE_PROPER_LICENSE_KEY
output.folder=/var/data/fing/kit/
refresh.interval=3600000
rounds=0

Edit kit.properties and insert your license ID.

After that, you can set up your system.

Windows

The command-line interface of Fing is a simple but powerful tool to integrate Fing in your daily work. It’s easy to perform network discoveries in the background or generate XML reports at regular intervals. If executed as a Windows Service, Fing automatically starts when you power on your computer, and automatically stops when you shut it down. As all Windows services, Fing Services can be managed from the Windows Service Control Panel.

You must use absolute paths for every file you provide in the command line (both output files and session file). Fing Service will run as LocalSystem user and will use the Home Folders of the user that registers the service to read and store configuration files, log files and any other accessory file.

To manually install it:

  fing --installservice FingKit --kit "%APPDATA%\Fing\conf\kit.properties"

The corresponding Fing network discovery with device recognition is installed as service and immediately started. Later, if you want to later uninstall the service, just type:

  fing --uninstallservice FingKit

N.B. Note that, at the moment, Fing service removal is not supported when completely uninstalling Fing. Hence, if you are in the process of upgrading or removing Fing software from your computer, you should stop and uninstall running Fing services as an initial step.

OS X

Copy or link the launch script from the installed location to the standard path of system daemons:

sudo cp /usr/local/lib/fing/launchd/com.fing.fingkit.FingKit.plist /Library/LaunchDaemons

To manually load and start the service in background, type:

sudo launchctl load /Library/LaunchDaemons/com.fing.fingkit.FingKit.plist

To unload:

sudo launchctl unload /Library/LaunchDaemons/com.fing.fingkit.FingKit.plist

Linux

OpenWRT

The two main services manager for Linux operating systems and also the Raspbian for your PI are System V (Red-hat, Centos, and other RPM-based distributions support it) and Upstart (Ubuntu and Debian).

On OpenWRT the standard should be System V. On Linux-based distributions it might be either System V or Upstart. The steps to do are really smooth anyways.

 System V

Copy or link the init.d script from the installed path to System V standard folder

sudo cp /usr/local/lib/fing/init.d/fing-kit /etc/init.d
sudo ln -s /usr/local/lib/fing/init.d/fing-kit /etc/init.d/fing-kit

Then add to your services with:

  chkconfig --add fing-kit

To manually control the service:

  • start:
  service fing-kit start
  • stop:
  service fing-kit stop
  • restart:
  service fing-kit restart

Upstart

Copy the upstart script from the installed path to Upstart root directory:

sudo cp /usr/local/lib/fing/upstart/fing-kit.conf /etc/init

To manage the service with upstart:

  • start:
sudo start fing-kit
  • stop:
sudo stop fing-kit

Raspberry PI

The Raspberry also has System V. There are a couple of specific steps in this case.

sudo cp /usr/local/lib/fing/init.d/fing-kit.raspberry /etc/init.d/fing-kit

Make sure you have installed chkconfig:

sudo apt-get install chkconfig

Then add to your services with:

sudo chkconfig --add fing-kit

To manually control the service:

  • start:
sudo systemctl start fing-kit
  • stop:
sudo systemctl stop fing-kit
  • restart:
sudo systemctl restart fing-kit

Docker

The Docker container can be run in the background using a simple option:

docker run --name fing –-net=host –-detach \
      –-mount type=bind,source=~/conf,target=/etc/fing \
      –-mount type=bind,source=~/data,target=/var/data/fing \
      docker-fing /usr/bin/fing –-kit /etc/fing/kit.properties

Before running the command you have to create the file kit.properties in ~/conf/kit.properties as explained in the kit documentation.

N.B. The path refers to the Docker file system. The mount options is required to have the configuration and the output folder on your system.

Was this article helpful?

Related Articles