Skip to content

Instantly share code, notes, and snippets.

@sanderpick
Created July 18, 2018 23:42
Show Gist options
  • Save sanderpick/3e161f0096d2fa347282b4bf8d132830 to your computer and use it in GitHub Desktop.
Save sanderpick/3e161f0096d2fa347282b4bf8d132830 to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
set -e
# textile daemon
wget https://s3.amazonaws.com/dist.textile.io/textile-go-linux-amd64.tar.gz
tar xvfz textile-go-linux-amd64.tar.gz
rm textile-go-linux-amd64.tar.gz
sudo mv textile-go-linux-amd64 /usr/local/bin/textile
# textile systemctl service
sudo bash -c 'cat >/lib/systemd/system/textile.service <<EOL
[Unit]
Description=textile
[Service]
ExecStart=/usr/local/bin/textile --daemon --server
Restart=always
User=ec2-user
Group=ec2-user
[Install]
WantedBy=multi-user.target
EOL'
# enable the new services
sudo systemctl daemon-reload
sudo systemctl enable textile.service
sudo systemctl start textile
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment