Skip to content

Commit 758aba4

Browse files
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>
1 parent d745117 commit 758aba4

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

registry/coder/modules/mux/README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Automatically install and run [mux](https://github.com/coder/mux) in a Coder wor
1414
module "mux" {
1515
count = data.coder_workspace.me.start_count
1616
source = "registry.coder.com/coder/mux/coder"
17-
version = "1.0.4"
17+
version = "1.0.5"
1818
agent_id = coder_agent.main.id
1919
}
2020
```
@@ -37,7 +37,7 @@ module "mux" {
3737
module "mux" {
3838
count = data.coder_workspace.me.start_count
3939
source = "registry.coder.com/coder/mux/coder"
40-
version = "1.0.4"
40+
version = "1.0.5"
4141
agent_id = coder_agent.main.id
4242
}
4343
```
@@ -48,7 +48,7 @@ module "mux" {
4848
module "mux" {
4949
count = data.coder_workspace.me.start_count
5050
source = "registry.coder.com/coder/mux/coder"
51-
version = "1.0.4"
51+
version = "1.0.5"
5252
agent_id = coder_agent.main.id
5353
# Default is "latest"; set to a specific version to pin
5454
install_version = "0.4.0"
@@ -61,7 +61,7 @@ module "mux" {
6161
module "mux" {
6262
count = data.coder_workspace.me.start_count
6363
source = "registry.coder.com/coder/mux/coder"
64-
version = "1.0.4"
64+
version = "1.0.5"
6565
agent_id = coder_agent.main.id
6666
port = 8080
6767
}
@@ -75,7 +75,7 @@ Run an existing copy of mux if found, otherwise install from npm:
7575
module "mux" {
7676
count = data.coder_workspace.me.start_count
7777
source = "registry.coder.com/coder/mux/coder"
78-
version = "1.0.3"
78+
version = "1.0.5"
7979
agent_id = coder_agent.main.id
8080
use_cached = true
8181
}
@@ -89,7 +89,7 @@ Run without installing from the network (requires mux to be pre-installed):
8989
module "mux" {
9090
count = data.coder_workspace.me.start_count
9191
source = "registry.coder.com/coder/mux/coder"
92-
version = "1.0.4"
92+
version = "1.0.5"
9393
agent_id = coder_agent.main.id
9494
install = false
9595
}

registry/coder/modules/mux/run.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ RESET='\033[0m'
55
MUX_BINARY="${INSTALL_PREFIX}/mux"
66

77
function run_mux() {
8+
# Remove stale server lock if present
9+
rm -f "$HOME/.mux/server.lock"
10+
811
local port_value
912
port_value="${PORT}"
1013
if [ -z "$port_value" ]; then

0 commit comments

Comments
 (0)