Add files via upload

check if already running
This commit is contained in:
kneutron 2023-09-10 18:44:40 -05:00 committed by GitHub
parent 89dca6524c
commit 747e46db3d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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