forked from jasonacox/TinySplunk
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbashrc
More file actions
35 lines (27 loc) · 723 Bytes
/
bashrc
File metadata and controls
35 lines (27 loc) · 723 Bytes
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
#
# Splunk Tiny Server - Script for bashrc
#
function menu {
echo "Splunk Commands:"
echo " status - splunk server status"
echo " logs - splunk server logs"
echo " start - start server"
echo " stop - stop server"
echo
}
# Check to see if container is running
RUNNING=$(/usr/bin/docker inspect --format="{{.State.Running}}" splunk 2> /dev/null)
echo -n "Checking Splunk Server: "
if [ "$RUNNING" = "true" ]; then
echo "RUNNING: Splunk container is running."
else
echo "STOPPED: Splunk container is not running."
fi
echo
# Set up aliases
alias start='docker start splunk'
alias stop='docker stop splunk'
alias logs='docker logs splunk'
alias status='~/status.sh'
# Show menu
menu