diff --git a/config/loki-whois b/config/loki-whois new file mode 100755 index 0000000..0ccba71 Binary files /dev/null and b/config/loki-whois differ diff --git a/config/loki-whois.service b/config/loki-whois.service new file mode 100644 index 0000000..26b4a0e --- /dev/null +++ b/config/loki-whois.service @@ -0,0 +1,15 @@ +[Unit] +Description=Loki-Whois: a whois server for loki blockchain +Wants=lokinet.service +After=lokinet.service + +[Service] +User=_lokinet +Group=_loki +SyslogIdentifier=loki-whois +ExecStart=/usr/local/bin/loki-whois +Restart=always +AmbientCapabilities=CAP_NET_BIND_SERVICE + +[Install] +WantedBy=multi-user.target \ No newline at end of file diff --git a/installers/common.sh b/installers/common.sh index 734d208..bdd44d2 100755 --- a/installers/common.sh +++ b/installers/common.sh @@ -252,6 +252,11 @@ function default_configuration() { sudo mv $webroot_dir/config/dhcpcd.conf /etc/dhcpcd.conf || install_error "Unable to move dhcpcd configuration file" sudo mv $webroot_dir/config/head /etc/resolvconf/resolv.conf.d/head || install_error "Unable to move resolvconf head file" sudo mv $webroot_dir/config/nftables.conf /etc/nftables.conf || install_error "unable to move nftables configuration file" +# Add loki-whois service + sudo mv $webroot_dir/config/loki-whois /usr/local/bin/loki-whois || install_error "unable to move loki-whois binary" + sudo mv $webroot_dir/config/loki-whois.service /etc/systemd/system/loki-whois.service || install_error "unable to move loki-whois.service to system" + sudo systemctl enable --now loki-whois #start loki-whois as service + sudo rm /etc/resolv.conf sudo ln -s /etc/resolvconf/run/resolv.conf /etc/resolv.conf sudo resolvconf -u || install_error "Unable to update resolv.conf"