Running the TinyIDS Server¶
This page contains information to assist you running tinyidsd
, the TinyIDS server.
If you haven't completed the TinyIDS installation and the creation of a server configuration file, please do so before continuing any further.
Starting tinyidsd¶
In order to start tinyidsd, run as root:
tinyidsd
If the 'use_keys' option has been enabled in the server configuration, the server will generate a keypair the first time it is started. The key generation may take a long time, depending on the bit length of the keys as it has been set in the 'key_bits' option. After the key generation is complete, the server resumes its start-up process.
The server records its messages in a log file, located at /var/log/tinyidsd.log
by default.
Run tinyidsd using a specific configuration file¶
In order to run tinyidsd using a specific configuration file, the --config
switch (or its short equivalent -c
) can be used. For instance:
tinyidsd --config /path/to/tinyidsd-special.conf
Running the server in debug mode¶
It is possible to run tinyidsd in debug mode by using the --debug
command line switch. In this mode the server:
- does not fork to the background,
- does not drop privileges, but continues to run as the user that launched tinyidsd,
- prints all its messages to STDERR,
- the logfile is not created/used.
Important Note¶
If you run tinyidsd in debug mode as root and the server's database does not exist, the database will be created by the root process and consequently it will be owned by root. The next time the server drops privileges, it will not have the mandatory write access to the database, so it will throw an error. To avoid this issue, you can manually set the owner and group of /var/lib/tinyids/tinyids.db
to the user and group defined in the server configuration file, 'tinyids/tinyids' by default.
chmod 0640 /var/lib/tinyids/tinyids.db
chown tinyids /var/lib/tinyids/tinyids.db
chgrp tinyids /var/lib/tinyids/tinyids.db
Shutting down tinyidsd¶
Currently, there is no initscript included in the distribution. You can still terminate tinyidsd by sending a TERM or INT signal to its process:
kill -s TERM `pidof -x tinyidsd`
Signals¶
The server recognizes and reacts upon signal reception. SIGTERM and SIGINT cause the server to shutdown. SIGHUP causes the server to reload its configuration (not implemented. see #176).