mirror of
https://github.com/kneutron/ansitest.git
synced 2025-01-16 04:42:55 +08:00
Add files via upload
check if already running
This commit is contained in:
parent
89dca6524c
commit
747e46db3d
13
topterm9.sh
13
topterm9.sh
@ -1,9 +1,12 @@
|
||||
#!/bin/bash
|
||||
|
||||
result=$(ps ax |awk '/tty9/ {print }' |grep -c top)
|
||||
|
||||
if [ $result -eq 0 ]; then
|
||||
# open top on vt9
|
||||
setterm -blank 0 2>/dev/null
|
||||
|
||||
usepg=open
|
||||
[ -e `which openvt` ] && usepg=openvt
|
||||
|
||||
( TERM=linux $usepg -f -c 9 -s -w -- /usr/bin/top -d 15 ) &
|
||||
( TERM=linux openvt -f -c 9 -w -- /usr/bin/top -d 15 ) &
|
||||
else
|
||||
echo "WARNING topterm9 already running - skipping"
|
||||
fi
|
||||
|
Loading…
x
Reference in New Issue
Block a user