diff --git a/Makefile b/Makefile index 9f3cb360..d378caf7 100644 --- a/Makefile +++ b/Makefile @@ -11,3 +11,18 @@ dns.o: dns.c gcc -pthread -std=c99 $(CXXFLAGS) dns.c -Wall -c -o dns.o %.o: %.cpp + +.PHONY: clean +clean: + rm -f dnsseed *.o + +PREFIX = /usr/local + +.PHONY: install +install: + mkdir -p $(DESTDIR)$(PREFIX)/bin + cp dnsseed $(DESTDIR)$(PREFIX)/bin + +.PHONY: uninstall +uninstall: + rm -f $(DESTDIR)$(PREFIX)/bin/dnsseed diff --git a/contrib/init/bitcoin-seeder.service b/contrib/init/bitcoin-seeder.service new file mode 100644 index 00000000..8946f1b3 --- /dev/null +++ b/contrib/init/bitcoin-seeder.service @@ -0,0 +1,14 @@ +[Unit] +Description=Bitcoin Seeder +After=network.target + +[Service] +ExecStart=/usr/local/bin/dnsseed -h dnsseed.example.com -n vps.example.com -m satoshin.gmx.com +User=root +Group=root + +Restart=on-failure +PrivateTmp=true + +[Install] +WantedBy=multi-user.target