Last active
August 18, 2022 22:02
-
-
Save nuthub/caf3a8f5cfc55fa2d67581c6159cde40 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Unit] | |
Description=Wormhole Transit Relay | |
[Service] | |
Type=forked | |
ExecStart=/opt/tr-venv/bin/twistd transitrelay | |
Restart=on-failure | |
[Install] | |
WantedBy=default.target |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- 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