mirror of
https://github.com/coder/registry.git
synced 2026-06-02 20:48:14 +00:00
fix(mux): delete server.lock before starting server (#591)
## Summary
Remove stale `~/.mux/server.lock` file before starting the mux server to
prevent startup failures when a previous server didn't clean up
properly.
## Changes
- Added `rm -f "${HOME}/.mux/server.lock"` at the start of the `run_mux`
function
- Bumped version to 1.0.5
## Testing
- All Terraform tests pass
- Shellcheck passes with only style warnings (unrelated to this change)
---------
Co-authored-by: Atif Ali <atif@coder.com>
This commit is contained in:
@@ -14,7 +14,7 @@ Automatically install and run [mux](https://github.com/coder/mux) in a Coder wor
|
|||||||
module "mux" {
|
module "mux" {
|
||||||
count = data.coder_workspace.me.start_count
|
count = data.coder_workspace.me.start_count
|
||||||
source = "registry.coder.com/coder/mux/coder"
|
source = "registry.coder.com/coder/mux/coder"
|
||||||
version = "1.0.4"
|
version = "1.0.5"
|
||||||
agent_id = coder_agent.main.id
|
agent_id = coder_agent.main.id
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
@@ -37,7 +37,7 @@ module "mux" {
|
|||||||
module "mux" {
|
module "mux" {
|
||||||
count = data.coder_workspace.me.start_count
|
count = data.coder_workspace.me.start_count
|
||||||
source = "registry.coder.com/coder/mux/coder"
|
source = "registry.coder.com/coder/mux/coder"
|
||||||
version = "1.0.4"
|
version = "1.0.5"
|
||||||
agent_id = coder_agent.main.id
|
agent_id = coder_agent.main.id
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
@@ -48,7 +48,7 @@ module "mux" {
|
|||||||
module "mux" {
|
module "mux" {
|
||||||
count = data.coder_workspace.me.start_count
|
count = data.coder_workspace.me.start_count
|
||||||
source = "registry.coder.com/coder/mux/coder"
|
source = "registry.coder.com/coder/mux/coder"
|
||||||
version = "1.0.4"
|
version = "1.0.5"
|
||||||
agent_id = coder_agent.main.id
|
agent_id = coder_agent.main.id
|
||||||
# Default is "latest"; set to a specific version to pin
|
# Default is "latest"; set to a specific version to pin
|
||||||
install_version = "0.4.0"
|
install_version = "0.4.0"
|
||||||
@@ -61,7 +61,7 @@ module "mux" {
|
|||||||
module "mux" {
|
module "mux" {
|
||||||
count = data.coder_workspace.me.start_count
|
count = data.coder_workspace.me.start_count
|
||||||
source = "registry.coder.com/coder/mux/coder"
|
source = "registry.coder.com/coder/mux/coder"
|
||||||
version = "1.0.4"
|
version = "1.0.5"
|
||||||
agent_id = coder_agent.main.id
|
agent_id = coder_agent.main.id
|
||||||
port = 8080
|
port = 8080
|
||||||
}
|
}
|
||||||
@@ -75,7 +75,7 @@ Run an existing copy of mux if found, otherwise install from npm:
|
|||||||
module "mux" {
|
module "mux" {
|
||||||
count = data.coder_workspace.me.start_count
|
count = data.coder_workspace.me.start_count
|
||||||
source = "registry.coder.com/coder/mux/coder"
|
source = "registry.coder.com/coder/mux/coder"
|
||||||
version = "1.0.3"
|
version = "1.0.5"
|
||||||
agent_id = coder_agent.main.id
|
agent_id = coder_agent.main.id
|
||||||
use_cached = true
|
use_cached = true
|
||||||
}
|
}
|
||||||
@@ -89,7 +89,7 @@ Run without installing from the network (requires mux to be pre-installed):
|
|||||||
module "mux" {
|
module "mux" {
|
||||||
count = data.coder_workspace.me.start_count
|
count = data.coder_workspace.me.start_count
|
||||||
source = "registry.coder.com/coder/mux/coder"
|
source = "registry.coder.com/coder/mux/coder"
|
||||||
version = "1.0.4"
|
version = "1.0.5"
|
||||||
agent_id = coder_agent.main.id
|
agent_id = coder_agent.main.id
|
||||||
install = false
|
install = false
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,6 +5,9 @@ RESET='\033[0m'
|
|||||||
MUX_BINARY="${INSTALL_PREFIX}/mux"
|
MUX_BINARY="${INSTALL_PREFIX}/mux"
|
||||||
|
|
||||||
function run_mux() {
|
function run_mux() {
|
||||||
|
# Remove stale server lock if present
|
||||||
|
rm -f "$HOME/.mux/server.lock"
|
||||||
|
|
||||||
local port_value
|
local port_value
|
||||||
port_value="${PORT}"
|
port_value="${PORT}"
|
||||||
if [ -z "$port_value" ]; then
|
if [ -z "$port_value" ]; then
|
||||||
|
|||||||
Reference in New Issue
Block a user