mirror of
https://github.com/discourse/discourse.git
synced 2024-11-28 00:33:37 +08:00
10 lines
225 B
Bash
10 lines
225 B
Bash
|
#!/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
|