diff --git a/CHANGELOG.md b/CHANGELOG.md index 82565fed..ff73d86b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # Release Notes for Craft Nitro +### Unreleased + +## Fixed +- Fixed an issue that occurred when creating new machines. + ### 1.0.0-RC1 - 2020-08-07 ## Added diff --git a/internal/cmd/config.go b/internal/cmd/config.go index ef6d00c6..0079292e 100644 --- a/internal/cmd/config.go +++ b/internal/cmd/config.go @@ -142,11 +142,6 @@ runcmd: - cp /etc/skel/.bash_logout /home/ubuntu/.bash_logout - sed -i 's|#force_color_prompt=yes|force_color_prompt=yes|g' /home/ubuntu/.bashrc - chown -R ubuntu:ubuntu /home/ubuntu/ - - curl -s https://api.github.com/repos/craftcms/nitro/releases/latest | grep "browser_download_url" | grep "nitrod_linux_x86_64" | cut -d : -f 2,3 | tr -d \" | wget --directory-prefix=/tmp -qi - - - cd /tmp && tar xfz /tmp/nitrod_linux_x86_64.tar.gz - - mv /tmp/nitrod /usr/sbin/ - - mv /tmp/nitrod.service /etc/systemd/system/ - - systemctl daemon-reload - - systemctl start nitrod - - systemctl enable nitrod + - wget https://raw.githubusercontent.com/craftcms/nitro/master/nitrod.sh -O /tmp/nitrod.sh + - bash /tmp/nitrod.sh ` diff --git a/nitrod.sh b/nitrod.sh new file mode 100755 index 00000000..8ed70d96 --- /dev/null +++ b/nitrod.sh @@ -0,0 +1,18 @@ +#!/bin/bash + +# download the +curl -s https://api.github.com/repos/craftcms/nitro/releases/latest \ + | grep "browser_download_url" \ + | grep "nitrod_linux_x86_64" \ + | cut -d : -f 2,3 | tr -d \" \ + | wget --directory-prefix=/tmp -qi - + +# move nitrod into place +cd /tmp && tar xfz /tmp/nitrod_linux_x86_64.tar.gz +mv /tmp/nitrod /usr/sbin/ +mv /tmp/nitrod.service /etc/systemd/system/ + +# setup the service +systemctl daemon-reload +systemctl start nitrod +systemctl enable nitrod