summarylogtreecommitdiffstats
path: root/lsa_launcher.sh
diff options
context:
space:
mode:
authorsL1pKn072017-09-05 19:33:02 +0200
committersL1pKn072017-09-05 19:34:35 +0200
commit786c4e40404c9c9c1ea33602c394b5bee5baf4f4 (patch)
treef19878fd91d0c489bda2a5f555c0c7a27b92aa9c /lsa_launcher.sh
downloadaur-786c4e40404c9c9c1ea33602c394b5bee5baf4f4.tar.gz
moh
Diffstat (limited to 'lsa_launcher.sh')
-rw-r--r--lsa_launcher.sh39
1 files changed, 39 insertions, 0 deletions
diff --git a/lsa_launcher.sh b/lsa_launcher.sh
new file mode 100644
index 000000000000..0aa18a9de7e0
--- /dev/null
+++ b/lsa_launcher.sh
@@ -0,0 +1,39 @@
+#!/usr/bin/bash
+export LD_LIBRARY_PATH=.
+pwd=/opt/lsi/LSIStorageAuthority
+
+start() {
+ cd "${pwd}/bin"
+ if pgrep -x "LSA" > /dev/null; then
+ killall -15 LSA
+ fi
+ ./LSA start
+}
+
+stop() {
+ cd "${pwd}/bin"
+ ./slp_deregister
+ if pgrep -x "LSA" > /dev/null; then
+ killall -15 LSA
+ fi
+}
+
+server_start() {
+ cd "${pwd}/server"
+ ./nginx -p .
+}
+
+stop_start() {
+ cd "${pwd}/server"
+ ./nginx -s stop -p .
+}
+
+reload() {
+ stop
+ server_stop
+ sleep 2
+ start
+ server_start
+}
+
+$1