Can anyone tell me how to run dns seeder as service on ubuntu? I want to be sure that my dns seeder is automatically running after server reboot
What version of Ubuntu are you running ?
On Ubuntu 14.04 LTS & 16.04 LTS,
run DNS seeder via /etc/rc.localI ilke to start a detached screen session, (called seeder-screen) everytime on boot.
(
Note: on Ubuntu 18.04 LTS, systemd has eliminated /etc/rc.local setups. In this OS, you can set up a systemd unit file in /etc/systemd/system, but it's not possible to pass parameters via the 'ExecStart' spec, so the binary should be hardcoded with your particular parameters, such as name of sub-domain served and the hosting IP address, etc.)
example:
#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.
### Bitmark DNS Seeder - Answers with ip-addresses in the da.bitmark.guru sub-domain
### which are all running know-good bitmark nodes
screen -dmS seeder-screen dnsseed -h da.bitmark.guru -n 204.68.122.22 -m dbkeys@bitmark.io
You can check functioning of the seeder by attaching to the seeder-screen session.
screen -dr seeder-screen
Bitmark (MARKS) DNS Seeder
Supporting whitelisted filters: 0x1,0x5,0x9,0xd
Starting 4 DNS threads for da.bitmark.guru on 204.68.122.22 (port 53).......done
Starting seeder...done
[18-09-16 14:34:42] 36/296 available (264 tried in 1000s, 0 new, 32 active), 307 banned; 3445 DNS requests, 3332 db querie