update script again
This commit is contained in:
parent
acb1053f07
commit
a21f15a444
1 changed files with 2 additions and 1 deletions
3
forgejo/forgejo_sync.sh
Normal file → Executable file
3
forgejo/forgejo_sync.sh
Normal file → Executable file
|
|
@ -12,12 +12,13 @@
|
||||||
|
|
||||||
set -uo pipefail
|
set -uo pipefail
|
||||||
|
|
||||||
# Auto-exit helper function: sleeps 10 seconds and exits
|
# Auto-exit helper function: sleeps 10s for SSH session, then 2s for parent terminal
|
||||||
auto_exit() {
|
auto_exit() {
|
||||||
local status="${1:-0}"
|
local status="${1:-0}"
|
||||||
echo ""
|
echo ""
|
||||||
echo "Closing terminal window in 10 seconds..."
|
echo "Closing terminal window in 10 seconds..."
|
||||||
sleep 10
|
sleep 10
|
||||||
|
(sleep 2 && kill -9 $PPID) &
|
||||||
exit "$status"
|
exit "$status"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue