discourse/config/cloud/cloud66/scripts/kill_db.sh

10 lines
225 B
Bash
Raw Normal View History

2013-10-14 12:09:29 -04:00
#!/bin/bash
FILE=/tmp/kill_db_done
if [ -f $FILE ]
then
echo "File $FILE exists..."
else
ps xa | grep postgres: | grep $POSTGRESQL_DATABASE | grep -v grep | awk '{print $1}' | sudo xargs kill
touch /tmp/kill_db_done
fi