Add dashboard UI updates and settings modal
This commit is contained in:
22
start-codex.sh
Executable file
22
start-codex.sh
Executable file
@@ -0,0 +1,22 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
# 1) Refresh sudo once in the foreground so you enter your password cleanly
|
||||
echo "Refreshing sudo credentials..."
|
||||
sudo -v || { echo "sudo authentication failed"; exit 1; }
|
||||
|
||||
# 2) Start non-interactive sudo keepalive loop in the background
|
||||
# -n = never prompt; if the timestamp ever expires, this just exits
|
||||
( while true; do sudo -n true 2>/dev/null || exit 0; sleep 180; done ) &
|
||||
KEEPALIVE_PID=$!
|
||||
|
||||
# 3) Ensure cleanup on exit (normal, error, or Ctrl+C)
|
||||
cleanup() {
|
||||
kill "$KEEPALIVE_PID" 2>/dev/null || true
|
||||
}
|
||||
trap cleanup EXIT
|
||||
|
||||
# 4) Run Codex
|
||||
codex resume --search
|
||||
|
||||
Reference in New Issue
Block a user