commit 88f1a41292c233ef6ab2426de14b6af49be71e62 Author: Brett Woodruff Date: Wed Feb 21 15:05:19 2024 -0500 First Commit diff --git a/README.md b/README.md new file mode 100644 index 0000000..e69de29 diff --git a/generate_app.sh b/generate_app.sh new file mode 100755 index 0000000..fef5655 --- /dev/null +++ b/generate_app.sh @@ -0,0 +1,37 @@ +#!/bin/bash + +# Prompt for the app name +read -p "Enter the name of your Splunk app: " APP_NAME + +# Prompt for the app description +read -p "Enter a description for your Splunk app: " APP_DESCRIPTION + +# Define the base directory for the app, adjust it if you have a different Splunk apps directory +SPLUNK_APPS_DIR="/opt/splunk/etc/apps" + +# Construct the app directory path +APP_DIR="$SPLUNK_APPS_DIR/$APP_NAME" + +# Create the directory structure +mkdir -p "$APP_DIR/bin" +mkdir -p "$APP_DIR/default" +mkdir -p "$APP_DIR/local" +mkdir -p "$APP_DIR/metadata" +mkdir -p "$APP_DIR/static" +mkdir -p "$APP_DIR/lookups" + +# Create a basic app.conf file +cat < "$APP_DIR/default/app.conf" +[launcher] +version = 1.0 +description = $APP_DESCRIPTION + +[ui] +is_visible = 1 +label = $APP_NAME + +[install] +is_configured = false +EOT + +echo "Splunk app $APP_NAME has been created successfully in $APP_DIR"