You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
453 B
16 lines
453 B
1 year ago
|
#!/bin/sh
|
||
|
|
||
|
# This script serves as a magic mirror, reflecting the running status of Bitcoin
|
||
|
|
||
|
# Look for bitcoin process
|
||
|
if ps -e | grep -q '[b]itcoind'; then
|
||
|
if [ -t 1 ]; then # Check if output is a terminal
|
||
|
echo "Bitcoin is running."
|
||
|
fi
|
||
|
exit 0 # Bitcoin is running (success)
|
||
|
else
|
||
|
if [ -t 1 ]; then # Check if output is a terminal
|
||
|
echo "Bitcoin is not running."
|
||
|
fi
|
||
|
exit 1 # Bitcoin is not running (failure)
|
||
|
fi
|