Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
I
imagej-elphel
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
3
Issues
3
List
Board
Labels
Milestones
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Elphel
imagej-elphel
Commits
79867866
Commit
79867866
authored
May 04, 2026
by
Andrey Filippov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: Integrate workspace locking into eyesis_mcp_ctl.sh
parent
479b64e0
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
0 deletions
+14
-0
eyesis_mcp_ctl.sh
scripts/eyesis_mcp_ctl.sh
+14
-0
No files found.
scripts/eyesis_mcp_ctl.sh
View file @
79867866
...
@@ -10,6 +10,17 @@ set -euo pipefail
...
@@ -10,6 +10,17 @@ set -euo pipefail
SCRIPT_DIR
=
"
$(
cd
"
$(
dirname
"
${
BASH_SOURCE
[0]
}
"
)
"
&&
pwd
)
"
SCRIPT_DIR
=
"
$(
cd
"
$(
dirname
"
${
BASH_SOURCE
[0]
}
"
)
"
&&
pwd
)
"
REPO_ROOT
=
"
$(
cd
"
${
SCRIPT_DIR
}
/.."
&&
pwd
)
"
REPO_ROOT
=
"
$(
cd
"
${
SCRIPT_DIR
}
/.."
&&
pwd
)
"
LOCK_SCRIPT
=
"
${
REPO_ROOT
}
/attic/elphel-agent-tools/bin/workspace_lock.sh"
check_lock
()
{
if
[[
-x
"
${
LOCK_SCRIPT
}
"
]]
;
then
if
!
"
${
LOCK_SCRIPT
}
"
check
;
then
echo
"Error: Workspace is locked."
>
&2
"
${
LOCK_SCRIPT
}
"
status
>
&2
exit
1
fi
fi
}
STATE_DIR
=
"
${
EYESIS_MCP_STATE_DIR
:-${
REPO_ROOT
}
/attic/session-logs
}
"
STATE_DIR
=
"
${
EYESIS_MCP_STATE_DIR
:-${
REPO_ROOT
}
/attic/session-logs
}
"
PID_FILE
=
"
${
STATE_DIR
}
/eyesis_mcp.pid"
PID_FILE
=
"
${
STATE_DIR
}
/eyesis_mcp.pid"
...
@@ -484,12 +495,15 @@ done
...
@@ -484,12 +495,15 @@ done
case
"
${
COMMAND
}
"
in
case
"
${
COMMAND
}
"
in
start
)
start
)
check_lock
start_process
start_process
;;
;;
stop
)
stop
)
check_lock
stop_process
stop_process
;;
;;
restart
)
restart
)
check_lock
stop_process
||
true
stop_process
||
true
start_process
start_process
;;
;;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment