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

Run linien-server as a systemd service? #330

Closed
bleykauf opened this issue Apr 4, 2023 · 2 comments
Closed

Run linien-server as a systemd service? #330

bleykauf opened this issue Apr 4, 2023 · 2 comments
Labels
duplicate This issue or pull request already exists idea Just an idea

Comments

@bleykauf
Copy link
Collaborator

bleykauf commented Apr 4, 2023

As suggested by @doronbehar in #277 (comment) , it would look like this

# linien.service
[Unit]
Description=Spectroscopy lock server for RedPitaya
Wants=network-online.target
After=network-online.target

[Service]
# Change this value either with `systemctl edit linien-server.service`, run
# `man systemctl(1)` to read documentation for this command. Perhaps this
# should be read from a file such as `/opt/linien/port` instead.
Environment="LINIEN_PORT=8000"
ExecStart=/usr/bin/env python3 /usr/lib/python3.10/site-packages/linien/server/server.py
# stop / start ethernet blinking using: mdio-tool[1], see:
# https://github.com/RedPitaya/RedPitaya/issues/205
#
# [1]: https://github.com/linien-org/mdio-tool
ExecStartPre=/usr/bin/mdio-tool w eth0 0x1b 0x0000
ExecStopPost=/usr/bin/mdio-tool w eth0 0x1b 0x0f00

[Install]
WantedBy=multi-user.target

# vim:ft=systemd
@bleykauf bleykauf added the idea Just an idea label Apr 4, 2023
@doronbehar
Copy link
Contributor

doronbehar commented Apr 4, 2023 via email

@bleykauf bleykauf added the duplicate This issue or pull request already exists label Apr 4, 2023
@bleykauf
Copy link
Collaborator Author

bleykauf commented Apr 4, 2023

A thanks, I thought I forgot about that!

@bleykauf bleykauf closed this as completed Apr 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists idea Just an idea
Projects
None yet
Development

No branches or pull requests

2 participants