Skip to content

Commit

Permalink
fix(stores): active store was not loaded
Browse files Browse the repository at this point in the history
  • Loading branch information
jonasroussel committed Aug 30, 2024
1 parent b73c1c5 commit 89473e6
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Originally created to facilitate the implementation of user-added domains in any
### On Linux with systemd

```shell
wget -O- 'https://raw.githubusercontent.com/jonasroussel/hyve/main/install.sh' | sh
wget -O- 'https://raw.githubusercontent.com/jonasroussel/hyve/main/install.sh' | bash
```

### With Docker
Expand Down
11 changes: 4 additions & 7 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,17 @@ arch=$(uname -m)
link="https://github.com/jonasroussel/hyve/releases/latest/download/hyve_${os}_${arch}.tar.gz"

# Check if hyve is already installed
if type "hyve" &> /dev/null
if command -v "hyve" &> /dev/null
then
echo "hyve is already installed"
exit 0
fi

# Download the binary with wget or curl
if type "wget" &> /dev/null
if command -v "wget" &> /dev/null
then
wget -O hyve.tar.gz "$link"
elif type "curl" &> /dev/null
elif command -v "curl" &> /dev/null
then
curl -L -o hyve.tar.gz "$link"
else
Expand All @@ -36,13 +36,10 @@ chmod +x hyve
# Move the binary to /usr/bin
sudo mv hyve /usr/bin

# Ask for the target url
read -p "Please enter the target URL to which requests will be proxied: " target

# Create the config.env file
sudo mkdir -p /etc/hyve
sudo cat <<EOF | sudo tee /etc/hyve/config.env
TARGET=$target
TARGET=
DATA_DIR=/var/lib/hyve
USER_DIR=/var/lib/hyve/user
STORE=file
Expand Down
5 changes: 5 additions & 0 deletions stores/store.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,9 @@ func Load() {
default:
log.Fatal("STORE_TYPE not supported")
}

err := Active.Load()
if err != nil {
log.Fatal(err)
}
}

0 comments on commit 89473e6

Please sign in to comment.