Skip to content

Instantly share code, notes, and snippets.

@nuthub
Last active August 18, 2022 22:02
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nuthub/caf3a8f5cfc55fa2d67581c6159cde40 to your computer and use it in GitHub Desktop.
Save nuthub/caf3a8f5cfc55fa2d67581c6159cde40 to your computer and use it in GitHub Desktop.
[Unit]
Description=Wormhole Transit Relay
[Service]
Type=forked
ExecStart=/opt/tr-venv/bin/twistd transitrelay
Restart=on-failure
[Install]
WantedBy=default.target
- name: Install virtualenv
apt:
pkg:
- pip
- virtualenv
state: present
- name: Install Magic Wormhole transit relay
command:
chdir: /opt
cmd: virtualenv tr-venv && pip install twisted && pip install magic-wormhole-transit-relay
- name: Install systemd unit
copy:
src: wormhole-tr.service
dest: /etc/systemd/system/wormhole-re.service
- name: Enable systemd unit
systemd:
name: wormhole-tr
enabled: yes
- name: Reread systemd configuration
systemd:
daemon_reload: yes
- name: Start magic wormhole transit relay
systemd:
started: true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment