summarylogtreecommitdiffstats
path: root/lsa_launcher.sh
blob: b40278556ae13f0c61c7bc28d52bf817769d2bc8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/usr/bin/bash
export MALLOC_CHECK_=0
pwd=/opt/lsi/LSIStorageAuthority

start() {
  cd "${pwd}/bin"
  if pgrep -x "LSA" > /dev/null; then
    killall -9 LSA
  fi
  ./LSA -start
}

stop() {
  cd "${pwd}/bin"
  ./slp_deregister
  if pgrep -x "LSA" > /dev/null; then
    killall -9 LSA
  fi
}

server_start() {
  cd "${pwd}/server"
  ./nginx -p .
}

server_stop() {
  cd "${pwd}/server"
  ./nginx -s stop -p .
}

reload() {
  stop
  server_stop
  sleep 2
  start
  server_start
}

$1