|
| 1 | +#!/bin/bash |
| 2 | + |
| 3 | +# Change the following variables to match your WildFly installation |
| 4 | +#JBOSS_HOME="/home/mshikalw/Documents/AllGitFork/wildfly/build/target/wildfly-28.0.2.Final-SNAPSHOT" |
| 5 | +WILDFLY_BIN="$JBOSS_HOME/bin" |
| 6 | + |
| 7 | + |
| 8 | +# Source file path (replace with the path of the file you want to copy) |
| 9 | +SOURCE_FILE="$JBOSS_HOME/docs/examples/configs/standalone-rts.xml" |
| 10 | + |
| 11 | +# Destination directory path (replace with the path of the directory where you want to copy the file) |
| 12 | +DESTINATION_DIR="$JBOSS_HOME/standalone/configuration/" |
| 13 | + |
| 14 | +# Check if the source file exists |
| 15 | +if [ -f "$SOURCE_FILE" ]; then |
| 16 | + # Check if the destination directory exists |
| 17 | + if [ -d "$DESTINATION_DIR" ]; then |
| 18 | + # Use 'cp' command to copy the file |
| 19 | + cp "$SOURCE_FILE" "$DESTINATION_DIR" |
| 20 | + echo "File copied successfully to $DESTINATION_DIR" |
| 21 | + else |
| 22 | + echo "Destination directory $DESTINATION_DIR does not exist." |
| 23 | + fi |
| 24 | +else |
| 25 | + echo "Source file $SOURCE_FILE does not exist." |
| 26 | +fi |
| 27 | + |
| 28 | +## Start Wilfly server |
| 29 | + |
| 30 | +echo "Starting wildfly server" |
| 31 | + |
| 32 | +# Call and run start-wildfly-coordinator.sh |
| 33 | +source ./start-wildfly-coordinator.sh |
| 34 | + |
| 35 | + |
| 36 | +echo "Starting all services" |
| 37 | + |
| 38 | +# Call and run start-services.sh |
| 39 | +source ./start-services.sh |
| 40 | + |
| 41 | + |
| 42 | +echo "Invoking trip service" |
| 43 | + |
| 44 | +# Call and run invoke-trip-service-url.sh |
| 45 | +source ./invoke-trip-service-url.sh |
| 46 | + |
| 47 | + |
| 48 | +echo "Stopping wildfly server" |
| 49 | + |
| 50 | +# Call and run scrstop-wildfly-coordinatoript.sh |
| 51 | +source stop-wildfly-coordinator.sh |
| 52 | + |
| 53 | + |
| 54 | +echo "Stopping all services" |
| 55 | + |
| 56 | +# Call and run stop-services.sh using the 'source' or '.' command |
| 57 | +source ./stop-services.sh |
0 commit comments