Paste #270531 |
pasted on 23.08.2023 14:58
- Edit to this paste
- Raw
- The following pastes replied to this paste: # 273798
- Show paste tree
-
Compare with paste
#

1 2 3 4 5 6 7 8 9 10 11 12 | #!/bin/bash # Define the Tomcat process name TOMCAT_PROCESS="tomcat" # Check if Tomcat process is running if pgrep -x "$TOMCAT_PROCESS" > /dev/null; then echo "Tomcat is running." else echo "Tomcat is not running." # You can add logic here to start Tomcat if desired fi |