force python2 and correct stop script
This commit is contained in:
parent
467f826846
commit
f47f9fcdf9
@ -14,7 +14,7 @@
|
||||
MRC_PATH=@MYSTIC_DIR@
|
||||
MRC_SERVER=mrc.bottomlessabyss.net
|
||||
MRC_PORT=5000
|
||||
MRC_PID=$(ps auxwww | grep "/usr/bin/python ./mrc_client.py" | grep -v grep | awk '{print $2}')
|
||||
MRC_PID=$(ps auxwww | grep "/usr/bin/python2 ./mrc_client.py" | grep -v grep | awk '{print $2}')
|
||||
|
||||
echo "Attempting to start the Multi Relay Chat (MRC) python script.."
|
||||
|
||||
@ -27,12 +27,12 @@ fi
|
||||
|
||||
# Starting the MRC python script
|
||||
cd $MRC_PATH >/dev/null
|
||||
python2 mrc_client.py $MRC_SERVER $MRC_PORT &
|
||||
/usr/bin/python2 ./mrc_client.py $MRC_SERVER $MRC_PORT &
|
||||
cd - >/dev/null
|
||||
|
||||
# Wait 3 seconds and check for a PID
|
||||
sleep 3
|
||||
MRC_PID=$(ps auxwww | grep "/usr/bin/python ./mrc_client.py" | grep -v grep | awk '{print $2}')
|
||||
MRC_PID=$(ps auxwww | grep "/usr/bin/python2 ./mrc_client.py" | grep -v grep | awk '{print $2}')
|
||||
|
||||
# Making sure it started successfully
|
||||
if [ ! -z "$MRC_PID" ]
|
||||
|
@ -12,7 +12,7 @@
|
||||
MRC_PATH=@MYSTIC_DIR@
|
||||
MRC_SERVER=mrc.bottomlessabyss.net
|
||||
MRC_PORT=5000
|
||||
MRC_PID=$(ps auxwww | grep "/usr/bin/python ./mrc_client.py" | grep -v grep | awk '{print $2}')
|
||||
MRC_PID=$(ps auxwww | grep "/usr/bin/python2 ./mrc_client.py" | grep -v grep | awk '{print $2}')
|
||||
|
||||
echo "Attempting to stop the Multi Relay Chat (MRC) python script.."
|
||||
|
||||
@ -33,7 +33,7 @@ echo "Checking to ensure the process stops.."
|
||||
|
||||
while [ $MRC_COUNTER -lt 6 ]
|
||||
do
|
||||
MRC_PID=$(ps auxwww | grep "/usr/bin/python ./mrc_client.py" | grep -v grep | awk '{print $2}')
|
||||
MRC_PID=$(ps auxwww | grep "/usr/bin/python2 ./mrc_client.py" | grep -v grep | awk '{print $2}')
|
||||
if [ ! -z "$MRC_PID" ]
|
||||
then
|
||||
echo "Process still running. Waiting 5 seconds.."
|
||||
@ -54,7 +54,7 @@ fi
|
||||
|
||||
# Wait 5 seconds, then double check to ensure it stopped. Otherwise it's considered a failure.
|
||||
sleep 5
|
||||
MRC_PID=$(ps auxwww | grep "/usr/bin/python ./mrc_client.py" | grep -v grep | awk '{print $2}')
|
||||
MRC_PID=$(ps auxwww | grep "/usr/bin/python2 ./mrc_client.py" | grep -v grep | awk '{print $2}')
|
||||
if [ ! -z "$MRC_PID" ]
|
||||
then
|
||||
echo "Error: Failed to kill the mrc_client.py script."
|
||||
|
Loading…
Reference in New Issue
Block a user