Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add service file for openrc #1520

Closed
wants to merge 1 commit into from
Closed

Conversation

Kreyren
Copy link

@Kreyren Kreyren commented Jan 21, 2021

Fixes: #1519

Signed-off-by: Jacob Hrbek [email protected]

Fixes: oxen-io#1519

Signed-off-by: Jacob Hrbek <[email protected]>
@Kreyren
Copy link
Author

Kreyren commented Jan 21, 2021

NOTE: This file is expected in /etc/init.d/oxen-node that requires adaptation of the build of deb package.

@jagerman
Copy link
Member

jagerman commented Jan 21, 2021

Did you test this and get it working? The part I'm concerned with is that it doesn't have an equivalent for the capabilities assignment (in the systemd init script, https://github.com/oxen-io/loki-network/blob/fadb0ea26cce55bc6bca3b2ddc57b2dcdda3b086/debian/lokinet.lokinet.service#L13-L14), without which lokinet won't be able to set up the tun device or bind to port 53.

Never mind, I see this is meant for oxen-core, not lokinet.

@majestrate
Copy link
Contributor

this looks like it's meant for the coin daemon not the onion routing daemon

@Kreyren
Copy link
Author

Kreyren commented Jan 21, 2021

Did you test this and get it working? @majestrate

kreyren@leonid:~$ ps -aux | grep oxen
kreyren  12876  0.6  1.0 4795952 173116 ?      SLsl 16:34   0:18 /usr/share/codium/codium --no-sandbox oxen-node
kreyren  17770  0.0  0.0   6176   664 pts/1    S+   17:23   0:00 grep oxen
kreyren@leonid:~$ sudo service oxen-node start
[sudo] password for kreyren: 
sudo: a password is required
kreyren@leonid:~$ sudo service oxen-node start
[sudo] password for kreyren: 
Starting oxen-node: oxend.
kreyren@leonid:~$ sudo service oxen-node status
oxend is running.
kreyren@leonid:~$ ps -aux | grep oxen
kreyren  12876  0.6  1.0 4795952 173116 ?      SLsl 16:34   0:18 /usr/share/codium/codium --no-sandbox oxen-node
_loki    17785  7.0  0.7 9220204 123112 ?      SLl  17:23   0:00 /usr/bin/oxend --non-interactive --config-file /etc/oxen/oxen.conf
kreyren  17811  0.0  0.0   6176   728 pts/1    S+   17:23   0:00 grep oxen
kreyren@leonid:~$ sudo service oxen-node stop
Stopping oxen-node: oxend.
kreyren@leonid:~$ sudo service oxen-node status
oxend is not running ... failed!

Looks working to me ^-^

@Kreyren
Copy link
Author

Kreyren commented Jan 21, 2021

FWIW created this in case you want to test it yourself:

FROM debian:stable

# NOTE(Krey): Expected to run interactively

RUN true \
	&& apt-get update \
	&& apt-get install curl lsb-release -y \
	&& curl -so /etc/apt/trusted.gpg.d/oxen.gpg https://deb.oxen.io/pub.gpg \
	&& echo "deb https://deb.oxen.io $(lsb_release -sc) main" | tee /etc/apt/sources.list.d/oxen.list \
	&& apt-get update \
	&& apt-get install openrc \
	&& curl -so /etc/init.d/oxen-node https://raw.githubusercontent.com/oxen-io/loki-network/7855d86db20ca12fc8b686adacd4b5bad465209f/debian/oxen-node.openrc \
	&& chmod +x /etc/init.d/oxen-node \
	&& apt-get install oxen-service-node -y \
	&& service oxen-node status \
	&& service oxen-node start

@jagerman
Copy link
Member

You opened this PR against the lokinet repository. It needs to get filed against the oxen-core repository.

@Kreyren
Copy link
Author

Kreyren commented Jan 21, 2021

@jagerman link? https://github.com/oxen-io/oxen-core is 404

@jagerman
Copy link
Member

Did you test this and get it working? The part I'm thinking might not work is that it doesn't have an equivalent for

@jagerman link? https://github.com/oxen-io/oxen-core is 404

My bad, we haven't renamed it yet: https://github.com/oxen-io/loki-core

@Kreyren
Copy link
Author

Kreyren commented Jan 21, 2021

Submitted in oxen-io/oxen-core#1395

@Kreyren Kreyren closed this Jan 21, 2021
@Kreyren Kreyren deleted the openrc-oxen-node branch January 21, 2021 17:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Provide OpenRC service file for service node
3 participants