mirror of
https://github.com/DJ2LS/FreeDATA
synced 2024-05-14 08:04:33 +00:00
Don't stop rigctld if it was started separate from FreeDATA
This commit is contained in:
parent
3afdbdbd8e
commit
68b50f3ff0
|
@ -15,6 +15,9 @@
|
||||||
# We expect the config.ini file to be at $HOME/.config/FreeDATA/config.ini
|
# We expect the config.ini file to be at $HOME/.config/FreeDATA/config.ini
|
||||||
# If it isn't found, we copy config.ini.example there
|
# If it isn't found, we copy config.ini.example there
|
||||||
#
|
#
|
||||||
|
# 1.6: 05 May 2024
|
||||||
|
# Don't stop rigctld if it was started separate from FreeDATA
|
||||||
|
# We only want to clean up FreeDATA initiated processes
|
||||||
# 1.5: 05 May 2024
|
# 1.5: 05 May 2024
|
||||||
# Check for rigctld at exit and stop it if needed
|
# Check for rigctld at exit and stop it if needed
|
||||||
# 1.4: 05 May 2024
|
# 1.4: 05 May 2024
|
||||||
|
@ -52,6 +55,11 @@ then
|
||||||
sleep 7s
|
sleep 7s
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Check for an already running rigctld process
|
||||||
|
# This was probably started by other means so we should leave this
|
||||||
|
# alone when we exit
|
||||||
|
checkrigexist=`ps auxw | grep -i rigctld | grep -v grep`
|
||||||
|
|
||||||
echo "*************************************************************************"
|
echo "*************************************************************************"
|
||||||
echo "Running the FreeDATA server component"
|
echo "Running the FreeDATA server component"
|
||||||
echo "*************************************************************************"
|
echo "*************************************************************************"
|
||||||
|
@ -122,15 +130,21 @@ echo "Stopping the server component"
|
||||||
echo "*************************************************************************"
|
echo "*************************************************************************"
|
||||||
kill $serverpid
|
kill $serverpid
|
||||||
|
|
||||||
# If rigctld is still running, stop it
|
# If rigctld was already running before starting FreeDATA, leave it alone
|
||||||
checkrigctld=`ps auxw | grep -i rigctld | grep -v grep`
|
# otherwise we should clean it up
|
||||||
if [ ! -z "$checkrigctld" ];
|
if [ -z "$checkrigexist" ];
|
||||||
then
|
then
|
||||||
echo "*************************************************************************"
|
# rigctld was started by FreeDATA and should have stoppped when the
|
||||||
echo "Stopping rigctld"
|
# server exited. If it didn't, stop it now.
|
||||||
echo "*************************************************************************"
|
checkrigctld=`ps auxw | grep -i rigctld | grep -v grep`
|
||||||
rigpid=`echo $checkrigctld | cut -f2 -d" "`
|
if [ ! -z "$checkrigctld" ];
|
||||||
kill $rigpid
|
then
|
||||||
|
echo "*************************************************************************"
|
||||||
|
echo "Stopping rigctld"
|
||||||
|
echo "*************************************************************************"
|
||||||
|
rigpid=`echo $checkrigctld | cut -f2 -d" "`
|
||||||
|
kill $rigpid
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Return to the directory we started in
|
# Return to the directory we started in
|
||||||
|
|
Loading…
Reference in a new issue