Files
secondo/Algebras/Temporal2/startMonitorAnd3TTYs.sh
2026-01-23 17:03:45 +08:00

32 lines
584 B
Bash

#!/bin/bash
pushd .
cd ~/secondo/bin
rm server.msg/*
rm nohup.out
nohup SecondoMonitor -s $* </dev/null &
pid=$!
echo $pid > startmoni.pid
echo "SecondoMonitor started in background with process id = $pid."
gnome-terminal --window-with-profile=bash_close -e SecondoTTYCS
gnome-terminal --window-with-profile=bash_close -e SecondoTTYCS
gnome-terminal --window-with-profile=bash_close -e SecondoTTYCS
read -rsp $'Press escape to continue...\n' -d $'\e'
killall -SIGTERM SecondoCS
while read p; do
echo $p
kill -SIGTERM $p
done < startmoni.pid
rm startmoni.pid
popd
exit $?