annotate stop.sh @ 21:b14073ab9d07

update luan
author Franklin Schmidt <fschmidt@gmail.com>
date Sat, 14 Sep 2024 22:17:26 -0600
parents dfc36e7ed22c
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
Vadim Filimonov <fffilimonov@yandex.ru>
parents:
diff changeset
1 #!/bin/bash
Vadim Filimonov <fffilimonov@yandex.ru>
parents:
diff changeset
2
Vadim Filimonov <fffilimonov@yandex.ru>
parents:
diff changeset
3 . common.sh;
Vadim Filimonov <fffilimonov@yandex.ru>
parents:
diff changeset
4
Vadim Filimonov <fffilimonov@yandex.ru>
parents:
diff changeset
5 sudo /usr/local/bin/nginx -s stop;
Vadim Filimonov <fffilimonov@yandex.ru>
parents:
diff changeset
6
Vadim Filimonov <fffilimonov@yandex.ru>
parents:
diff changeset
7 if [ -f ${hgservepid} ]; then
Vadim Filimonov <fffilimonov@yandex.ru>
parents:
diff changeset
8 kill -2 `cat ${hgservepid}`;
Vadim Filimonov <fffilimonov@yandex.ru>
parents:
diff changeset
9 rm ${hgservepid};
Vadim Filimonov <fffilimonov@yandex.ru>
parents:
diff changeset
10 fi;
Vadim Filimonov <fffilimonov@yandex.ru>
parents:
diff changeset
11
Vadim Filimonov <fffilimonov@yandex.ru>
parents:
diff changeset
12 LUAN_PIDS=$(ps ax | awk '{if($0~"[s]erve.luan"){print $1}}');
Vadim Filimonov <fffilimonov@yandex.ru>
parents:
diff changeset
13 kill -TERM $LUAN_PIDS;
Vadim Filimonov <fffilimonov@yandex.ru>
parents:
diff changeset
14 exit 0;