Skip to content

Commit

Permalink
fix(bug): create /usr/local/bin if not present (#614)
Browse files Browse the repository at this point in the history
* create /usr/local/bin if installer does not have that directory in unix install script

* minor readme updates
  • Loading branch information
schmikei authored Mar 29, 2022
1 parent 4b9cc75 commit 48c23de
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,11 +99,12 @@ Group=root

Restart Stanza: `sudo systemctl restart stanza`.

### Linux / Macos Script
### Linux / macOS Script

- Single command install, requires the `curl` command
- Stanza will automatically be running as a service
- On Linux, Stanza will be running as the `root` user. On Macos, Stanza will be running as your current user.
- `sudo` is always required for Linux installations while macOS requires it if the invoking user does not have write permissions to `/usr/local/bin`.

```shell
sh -c "$(curl -fsSlL https://github.com/observiq/stanza/releases/latest/download/unix-install.sh)" unix-install.sh
Expand Down
6 changes: 5 additions & 1 deletion scripts/unix-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -481,9 +481,13 @@ install_package()

info "Setting permissions..."
chmod +x "$agent_binary"
ln -sf "$agent_binary" "/usr/local/bin/$BINARY_NAME"
succeeded

info "Linking binary $agent_binary => /usr/local/bin/$BINARY_NAME"
mkdir -p /usr/local/bin
ln -sf "$agent_binary" "/usr/local/bin/$BINARY_NAME"
succeeded

info "Downloading plugins..."
mkdir -p "$agent_home/tmp"
curl -L "$plugins_download_url" -o "$agent_home/tmp/plugins.tar.gz" --progress-bar --fail || error_exit "$LINENO" "Failed to download plugins"
Expand Down

0 comments on commit 48c23de

Please sign in to comment.