Created
July 18, 2018 23:42
-
-
Save sanderpick/3e161f0096d2fa347282b4bf8d132830 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
#!/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