Compare commits
2 Commits
41f1e2e1d0
...
c282674057
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c282674057 | ||
|
|
3b222b4b89 |
@@ -42,7 +42,9 @@ USAGE
|
|||||||
}
|
}
|
||||||
|
|
||||||
pid_from_file() {
|
pid_from_file() {
|
||||||
tr -cd '0-9' < "$PID_FILE" 2>/dev/null || true
|
if [[ -f "$PID_FILE" ]]; then
|
||||||
|
tr -cd '0-9' < "$PID_FILE" 2>/dev/null || true
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
server_pid() {
|
server_pid() {
|
||||||
@@ -349,7 +351,10 @@ extract_codex_binary() {
|
|||||||
tar -xzf "$archive" -C "$dest/extract"
|
tar -xzf "$archive" -C "$dest/extract"
|
||||||
found="$(find "$dest/extract" -type f -name codex -print | head -n 1)"
|
found="$(find "$dest/extract" -type f -name codex -print | head -n 1)"
|
||||||
if [[ -z "$found" ]]; then
|
if [[ -z "$found" ]]; then
|
||||||
echo "downloaded archive does not contain a codex binary" >&2
|
found="$(find "$dest/extract" -type f -name 'codex-*' -perm -u+x -print | head -n 1)"
|
||||||
|
fi
|
||||||
|
if [[ -z "$found" ]]; then
|
||||||
|
echo "downloaded archive does not contain a Codex executable" >&2
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
chmod +x "$found"
|
chmod +x "$found"
|
||||||
@@ -549,7 +554,7 @@ apply_upgrade_worker() {
|
|||||||
return "$rc"
|
return "$rc"
|
||||||
}
|
}
|
||||||
|
|
||||||
cmd="${1:-start}"
|
cmd="${1:-help}"
|
||||||
case "$cmd" in
|
case "$cmd" in
|
||||||
start)
|
start)
|
||||||
shift || true
|
shift || true
|
||||||
|
|||||||
Reference in New Issue
Block a user