We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ae673ec commit 47560e0Copy full SHA for 47560e0
utilities/project_helpers/scripts/restart_if_needed.sh
@@ -0,0 +1,19 @@
1
+#!/bin/bash
2
+
3
+cd "$(cd "$(dirname "$0")" ; pwd -P )"
4
+date
5
6
+# Restart DSpace stack if repository is not responding with HTTP 200.
7
+status=`curl -k -o /dev/null -s -w "%{http_code}" https://localhost/repository/xmlui/`
8
+if [[ $status -ne "200" ]]; then
9
+ echo "Automatically restarting DSpace stack due to HTTP status $status ..."
10
+ ./stop_stack.sh
11
+ sleep 3
12
+ ./start_stack.sh
13
+ echo "DSpace stack restart complete."
14
+else
15
+ echo "No restart needed: HTTP status is $status."
16
+fi
17
18
19
+echo
0 commit comments