Clean up repository for public release
- Add comprehensive .gitignore for IDEs (VS Code, IntelliJ IDEA, Visual Studio, etc.) - Remove temporary test files and internal documentation - Update Docker config example to use placeholder secret - Remove log files from tracking - Prepare repository for public Git push Changes: - Added .gitignore with support for all major IDEs and editors - Removed test_*.sh development test files - Removed internal documentation files - Cleaned up sensitive configuration examples - Removed log files from version control
This commit is contained in:
189
.gitignore
vendored
Normal file
189
.gitignore
vendored
Normal file
@ -0,0 +1,189 @@
|
||||
# Binaries and executables
|
||||
hmac-file-server
|
||||
*.exe
|
||||
*.dll
|
||||
*.so
|
||||
*.dylib
|
||||
|
||||
# Test binary, built with `go test -c`
|
||||
*.test
|
||||
|
||||
# Output of the go coverage tool
|
||||
*.out
|
||||
|
||||
# Dependency directories
|
||||
vendor/
|
||||
|
||||
# Go workspace file
|
||||
go.work
|
||||
|
||||
# IDE and Editor files
|
||||
# Visual Studio Code
|
||||
.vscode/
|
||||
*.code-workspace
|
||||
|
||||
# IntelliJ IDEA / JetBrains IDEs
|
||||
.idea/
|
||||
*.iws
|
||||
*.iml
|
||||
*.ipr
|
||||
out/
|
||||
|
||||
# Visual Studio
|
||||
.vs/
|
||||
*.user
|
||||
*.userosscache
|
||||
*.sln.docstates
|
||||
*.vcxproj.filters
|
||||
*.vcxproj.user
|
||||
|
||||
# Vim
|
||||
*.swp
|
||||
*.swo
|
||||
*~
|
||||
.netrwhist
|
||||
Session.vim
|
||||
|
||||
# Emacs
|
||||
*~
|
||||
\#*\#
|
||||
/.emacs.desktop
|
||||
/.emacs.desktop.lock
|
||||
*.elc
|
||||
auto-save-list
|
||||
tramp
|
||||
.\#*
|
||||
|
||||
# Sublime Text
|
||||
*.sublime-workspace
|
||||
*.sublime-project
|
||||
|
||||
# Atom
|
||||
.atom/
|
||||
|
||||
# Eclipse
|
||||
.metadata
|
||||
bin/
|
||||
tmp/
|
||||
*.tmp
|
||||
*.bak
|
||||
*.swp
|
||||
*~.nib
|
||||
local.properties
|
||||
.settings/
|
||||
.loadpath
|
||||
.recommenders
|
||||
|
||||
# NetBeans
|
||||
/nbproject/private/
|
||||
/nbbuild/
|
||||
/dist/
|
||||
/nbdist/
|
||||
/.nb-gradle/
|
||||
|
||||
# Xcode
|
||||
*.pbxuser
|
||||
!default.pbxuser
|
||||
*.mode1v3
|
||||
!default.mode1v3
|
||||
*.mode2v3
|
||||
!default.mode2v3
|
||||
*.perspectivev3
|
||||
!default.perspectivev3
|
||||
xcuserdata/
|
||||
*.moved-aside
|
||||
*.xccheckout
|
||||
*.xcscmblueprint
|
||||
|
||||
# Android Studio
|
||||
*.iml
|
||||
.gradle
|
||||
/local.properties
|
||||
/.idea/caches
|
||||
/.idea/libraries
|
||||
/.idea/modules.xml
|
||||
/.idea/workspace.xml
|
||||
/.idea/navEditor.xml
|
||||
/.idea/assetWizardSettings.xml
|
||||
.DS_Store
|
||||
/build
|
||||
/captures
|
||||
.externalNativeBuild
|
||||
.cxx
|
||||
|
||||
# Code::Blocks
|
||||
*.depend
|
||||
*.layout
|
||||
*.cbp
|
||||
|
||||
# CLion
|
||||
cmake-build-*/
|
||||
|
||||
# Kate
|
||||
*.kate-swp
|
||||
.kateconfig
|
||||
|
||||
# Geany
|
||||
*.geany
|
||||
|
||||
# Fleet
|
||||
.fleet/
|
||||
|
||||
# OS generated files
|
||||
.DS_Store
|
||||
.DS_Store?
|
||||
._*
|
||||
.Spotlight-V100
|
||||
.Trashes
|
||||
ehthumbs.db
|
||||
Thumbs.db
|
||||
|
||||
# Log files
|
||||
*.log
|
||||
logs/
|
||||
|
||||
# Temporary files
|
||||
tmp/
|
||||
temp/
|
||||
*.tmp
|
||||
|
||||
# Configuration files with secrets (keep examples)
|
||||
config.toml
|
||||
!config-example*.toml
|
||||
|
||||
# Data directories
|
||||
data/
|
||||
uploads/
|
||||
deduplication/
|
||||
|
||||
# Installation test files
|
||||
test_*.sh
|
||||
*_test_*.sh
|
||||
|
||||
# Development and testing artifacts
|
||||
coverage.html
|
||||
coverage.out
|
||||
profile.out
|
||||
|
||||
# Docker volumes and build context
|
||||
dockerenv/data/uploads/*
|
||||
dockerenv/data/logs/*
|
||||
dockerenv/data/duplicates/*
|
||||
dockerenv/data/temp/*
|
||||
!dockerenv/data/*/*.txt
|
||||
|
||||
# Build artifacts
|
||||
build/
|
||||
dist/
|
||||
*.deb
|
||||
*.rpm
|
||||
*.tar.gz
|
||||
*.zip
|
||||
|
||||
# Local environment files
|
||||
.env
|
||||
.env.local
|
||||
|
||||
# Documentation that shouldn't be public
|
||||
DOCUMENTATION_VERIFICATION_REPORT.md
|
||||
ENHANCEMENTS_COMPLETED.md
|
@ -1,119 +0,0 @@
|
||||
# HMAC File Server Documentation Verification Report
|
||||
|
||||
**Date**: 13. Juni 2025
|
||||
**Project**: HMAC File Server 3.2
|
||||
**Status**: ✅ VERIFIED AND UPDATED
|
||||
|
||||
## 📋 Documentation Files Overview
|
||||
|
||||
| File | Status | Content Verification | Installation Coverage |
|
||||
|------|--------|---------------------|----------------------|
|
||||
| `README.MD` | ✅ Updated | Complete | Both Native & Docker |
|
||||
| `INSTALL.MD` | ✅ Updated | Complete | Both Native & Docker |
|
||||
| `WIKI.MD` | ✅ Updated | Complete | Enhanced Docker section |
|
||||
| `CHANGELOG.MD` | ✅ Updated | Complete | Version 3.2 changes |
|
||||
| `PROTOCOL_SPECIFICATIONS.MD` | ✅ Verified | Complete | Technical specs |
|
||||
| `ENHANCEMENTS_COMPLETED.md` | ✅ Created | Complete | Enhancement documentation |
|
||||
|
||||
## 🔍 Content Verification Results
|
||||
|
||||
### ✅ README.MD
|
||||
- **Installation Section**: Updated to mention both deployment options
|
||||
- **Features**: Comprehensive list with current capabilities
|
||||
- **Docker Information**: References automated installer Docker option
|
||||
- **Manual Installation**: Updated with Docker deployment notes
|
||||
- **Status**: Fully up-to-date with installer enhancements
|
||||
|
||||
### ✅ INSTALL.MD
|
||||
- **Installation Options**: Clearly explains Native vs Docker deployment
|
||||
- **Prerequisites**: Updated for both deployment types
|
||||
- **Docker Deployment Features**: Comprehensive list of automated Docker setup
|
||||
- **Post-Installation**: Separate instructions for native and Docker deployments
|
||||
- **XMPP Integration**: Maintained for both deployment types
|
||||
- **Status**: Completely rewritten to reflect new installer capabilities
|
||||
|
||||
### ✅ WIKI.MD
|
||||
- **Docker Section**: Enhanced with automated deployment information
|
||||
- **Manual Docker Setup**: Preserved for advanced users
|
||||
- **Configuration Examples**: Updated for Docker deployments
|
||||
- **Quickstart**: Improved with automated installer references
|
||||
- **Status**: Enhanced with automated Docker deployment documentation
|
||||
|
||||
### ✅ CHANGELOG.MD
|
||||
- **Version 3.2**: Added comprehensive entries for installer enhancements
|
||||
- **Enhancement Details**: Docker deployment, selectable config directory, Unicode removal, duplicate output fixes
|
||||
- **Technical Changes**: Documented installer UX improvements
|
||||
- **Status**: Updated with all recent enhancements
|
||||
|
||||
### ✅ PROTOCOL_SPECIFICATIONS.MD
|
||||
- **Technical Accuracy**: Verified technical specifications
|
||||
- **API Documentation**: Complete and current
|
||||
- **Protocol Versions**: All versions documented
|
||||
- **Status**: No changes needed, already comprehensive
|
||||
|
||||
### ✅ ENHANCEMENTS_COMPLETED.md
|
||||
- **New Documentation**: Created to document the enhancement project
|
||||
- **Implementation Details**: Technical implementation explanations
|
||||
- **Validation Results**: Test results and verification
|
||||
- **Status**: Newly created and complete
|
||||
|
||||
## 🚀 Installation Documentation Completeness
|
||||
|
||||
### Native Installation Coverage
|
||||
- ✅ Prerequisites clearly listed
|
||||
- ✅ Step-by-step installation process
|
||||
- ✅ Post-installation configuration
|
||||
- ✅ Service management instructions
|
||||
- ✅ Troubleshooting guidance
|
||||
- ✅ XMPP integration examples
|
||||
|
||||
### Docker Deployment Coverage
|
||||
- ✅ Automated installer Docker option explained
|
||||
- ✅ Manual Docker setup preserved
|
||||
- ✅ Docker-compose configuration
|
||||
- ✅ Container management instructions
|
||||
- ✅ Service orchestration details
|
||||
- ✅ Start/stop script usage
|
||||
|
||||
### Configuration Management
|
||||
- ✅ Selectable configuration directory documented
|
||||
- ✅ Both deployment types covered
|
||||
- ✅ Environment variable options
|
||||
- ✅ Security considerations
|
||||
- ✅ Optional features (Redis, ClamAV, JWT)
|
||||
|
||||
## 🎯 Key Improvements Made
|
||||
|
||||
1. **Consistency Across Files**: All documentation now consistently references both deployment options
|
||||
2. **Docker Integration**: Automated Docker deployment is prominently featured
|
||||
3. **User Choice**: Clear explanation of when to choose native vs Docker deployment
|
||||
4. **Installation Flexibility**: Selectable configuration directory is documented
|
||||
5. **Enhanced User Experience**: Removal of Unicode dependencies documented
|
||||
6. **Comprehensive Coverage**: Both technical and user-focused documentation updated
|
||||
|
||||
## ✅ Verification Checklist
|
||||
|
||||
- [x] All MD files exist and are readable
|
||||
- [x] Installation instructions are complete for both deployment types
|
||||
- [x] Docker deployment option is properly documented
|
||||
- [x] Configuration directory selection is mentioned
|
||||
- [x] Post-installation instructions cover both deployment types
|
||||
- [x] XMPP integration examples are current
|
||||
- [x] Changelog reflects all recent enhancements
|
||||
- [x] Technical specifications are accurate
|
||||
- [x] No broken internal references
|
||||
- [x] Consistent formatting and structure
|
||||
|
||||
## 📈 Documentation Quality Score: 10/10
|
||||
|
||||
**All documentation files have been verified, updated, and are production-ready.**
|
||||
|
||||
The HMAC File Server 3.2 documentation now comprehensively covers:
|
||||
- Traditional native installation with systemd
|
||||
- New automated Docker deployment option
|
||||
- Flexible configuration directory selection
|
||||
- Enhanced installer user experience
|
||||
- Complete technical specifications
|
||||
- Proper XMPP server integration guidance
|
||||
|
||||
**Recommendation**: The documentation is complete and ready for release with version 3.2.
|
@ -1,98 +0,0 @@
|
||||
# HMAC File Server Installer Enhancements - COMPLETED
|
||||
|
||||
## Summary
|
||||
All requested enhancements have been successfully implemented and validated in the HMAC File Server installer script.
|
||||
|
||||
## ✅ Enhancement 1: Selectable Configuration Directory
|
||||
**Status: COMPLETED**
|
||||
- Modified `get_user_input()` function to prompt users for custom configuration directory
|
||||
- Changed from hardcoded `DEFAULT_CONFIG_DIR` to user-selectable `CONFIG_DIR` variable
|
||||
- Updated all references throughout the script to use the `CONFIG_DIR` variable
|
||||
- Maintains backward compatibility with default `/etc/hmac-file-server` if user presses Enter
|
||||
|
||||
## ✅ Enhancement 2: Removed Duplicate Output on Finalization
|
||||
**Status: COMPLETED**
|
||||
- Eliminated redundant installation completion messages
|
||||
- Consolidated completion information into single `print_completion_info()` function
|
||||
- Function is called only once in the native installation workflow
|
||||
- Docker deployment has its own streamlined completion message
|
||||
- No more duplicate service information or endpoint details
|
||||
|
||||
## ✅ Enhancement 3: Removed All Emoticons and Unicode Symbols
|
||||
**Status: COMPLETED**
|
||||
- Systematically removed all Unicode characters including:
|
||||
- ✓, ✅, ❌, ⚠️ (checkmarks and warning symbols)
|
||||
- 🚀, 🌐, 📁, ⚡, 🔧, 📚 (various emoji)
|
||||
- • (bullet points)
|
||||
- █ (block characters)
|
||||
- ──── (Unicode dashes)
|
||||
- Replaced with standard ASCII equivalents (-, +, *, etc.)
|
||||
- Script now uses only standard ASCII characters for universal compatibility
|
||||
|
||||
## ✅ Enhancement 4: Docker Deployment Option
|
||||
**Status: COMPLETED**
|
||||
- Added comprehensive Docker deployment workflow as alternative to native installation
|
||||
- Created installation type selection menu (Native vs Docker)
|
||||
- Implemented Docker-specific functions:
|
||||
- `create_docker_deployment()` - Sets up complete Docker environment
|
||||
- `generate_docker_config()` - Creates container-optimized configuration
|
||||
- Features included:
|
||||
- Multi-service docker-compose.yml with Redis and ClamAV
|
||||
- Multi-stage Dockerfile for optimized container builds
|
||||
- Automated start/stop scripts for easy management
|
||||
- Container-specific directory structure and volume mappings
|
||||
- Proper networking between services
|
||||
- Updated help documentation to reflect Docker option
|
||||
|
||||
## 🧪 Validation Results
|
||||
- **Syntax Check**: ✅ PASSED - No bash syntax errors
|
||||
- **Help Function**: ✅ PASSED - Docker deployment mentioned
|
||||
- **Unicode Removal**: ✅ PASSED - No Unicode symbols found
|
||||
- **CONFIG_DIR Usage**: ✅ PASSED - Consistently used throughout (Docker container paths excluded)
|
||||
- **Docker Functions**: ✅ PASSED - All Docker functions present and working
|
||||
- **Duplicate Prevention**: ✅ PASSED - Completion info displayed only once
|
||||
- **Script Structure**: ✅ PASSED - All key functions present and functional
|
||||
|
||||
## 📁 Files Modified
|
||||
- **Main Script**: `/home/renz/source/hmac-file-server/installer.sh` (extensively enhanced)
|
||||
- **Documentation**: Updated `README.MD`, `INSTALL.MD`, `WIKI.MD`, `CHANGELOG.MD`
|
||||
- **Test Scripts**: Created validation scripts to ensure functionality
|
||||
|
||||
## 🔧 Technical Implementation Details
|
||||
|
||||
### Configuration Directory Selection
|
||||
```bash
|
||||
# User can now customize config directory
|
||||
read -p "Configuration directory [$DEFAULT_CONFIG_DIR]: " CONFIG_DIR
|
||||
CONFIG_DIR=${CONFIG_DIR:-$DEFAULT_CONFIG_DIR}
|
||||
```
|
||||
|
||||
### Docker Deployment Structure
|
||||
- Isolated directory structure with proper volume mappings
|
||||
- Redis and ClamAV services properly networked
|
||||
- Container-optimized paths (/var/lib, /var/log, /etc)
|
||||
- Both deployment types maintain same configuration options
|
||||
|
||||
### Code Quality
|
||||
- Maintains all existing functionality
|
||||
- Backward compatible with previous usage patterns
|
||||
- Follows bash best practices
|
||||
- Comprehensive error handling preserved
|
||||
|
||||
## 🎯 Outcome
|
||||
The HMAC File Server installer script now provides:
|
||||
1. **Flexible Configuration**: Users can select custom configuration directories
|
||||
2. **Clean Output**: No duplicate information during installation
|
||||
3. **Universal Compatibility**: Works with all terminal types (no Unicode dependencies)
|
||||
4. **Modern Deployment Options**: Choice between traditional systemd service or containerized Docker deployment
|
||||
|
||||
The installer is production-ready and significantly enhanced while maintaining full backward compatibility.
|
||||
|
||||
## 📖 Documentation Updates
|
||||
All documentation files have been updated to reflect the new capabilities:
|
||||
- **README.MD**: Updated installation section with deployment options
|
||||
- **INSTALL.MD**: Added comprehensive Docker deployment instructions
|
||||
- **WIKI.MD**: Enhanced Docker section with automated deployment info
|
||||
- **CHANGELOG.MD**: Documented all enhancements in version 3.2
|
||||
|
||||
The project documentation now accurately reflects both the traditional installation method and the new automated Docker deployment option, providing users with clear guidance for their preferred deployment strategy.
|
@ -37,7 +37,7 @@ writetimeout = "3600s"
|
||||
idletimeout = "3600s"
|
||||
|
||||
[security]
|
||||
secret = "hmac-file-server-is-the-win"
|
||||
secret = "CHANGE-THIS-TO-YOUR-SECRET-KEY-MINIMUM-32-CHARACTERS"
|
||||
|
||||
[versioning]
|
||||
enableversioning = false
|
||||
|
@ -1,115 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Final validation test script for HMAC File Server installer
|
||||
# Tests all the requested enhancements
|
||||
|
||||
echo "=== HMAC File Server Installer - Final Validation Test ==="
|
||||
echo ""
|
||||
|
||||
# Test 1: Help function (should show Docker option)
|
||||
echo "1. Testing help function..."
|
||||
echo " Expected: Should mention Docker deployment option"
|
||||
echo ""
|
||||
./installer.sh --help | grep -i docker
|
||||
if [ $? -eq 0 ]; then
|
||||
echo " ✓ PASS: Docker option mentioned in help"
|
||||
else
|
||||
echo " ✗ FAIL: Docker option not found in help"
|
||||
fi
|
||||
echo ""
|
||||
|
||||
# Test 2: Check for Unicode/emoticon removal
|
||||
echo "2. Testing Unicode/emoticon removal..."
|
||||
unicode_count=$(grep -P '[✓✅❌⚠️🚀🌐📁⚡🔧📚•█─]' installer.sh | wc -l)
|
||||
if [ $unicode_count -eq 0 ]; then
|
||||
echo " ✓ PASS: No Unicode symbols/emoticons found"
|
||||
else
|
||||
echo " ✗ FAIL: Found $unicode_count Unicode symbols/emoticons"
|
||||
echo " Details:"
|
||||
grep -P '[✓✅❌⚠️🚀🌐📁⚡🔧📚•█─]' installer.sh | head -3
|
||||
fi
|
||||
echo ""
|
||||
|
||||
# Test 3: Check for configurable CONFIG_DIR usage
|
||||
echo "3. Testing configurable CONFIG_DIR..."
|
||||
config_dir_usage=$(grep -c "CONFIG_DIR" installer.sh)
|
||||
# Exclude Docker container paths and DEFAULT_CONFIG_DIR definition
|
||||
hardcoded_usage=$(grep "/etc/hmac-file-server" installer.sh | grep -v "DEFAULT_CONFIG_DIR" | grep -v "container:" | grep -v "CONFIG_PATH=" | grep -v "CMD.*config" | wc -l)
|
||||
if [ $config_dir_usage -gt 5 ] && [ $hardcoded_usage -eq 0 ]; then
|
||||
echo " ✓ PASS: CONFIG_DIR variable used consistently"
|
||||
else
|
||||
echo " ⚠ INFO: CONFIG_DIR usage: $config_dir_usage, Docker container paths: $hardcoded_usage"
|
||||
echo " ✓ PASS: Hardcoded paths are only in Docker container contexts (acceptable)"
|
||||
fi
|
||||
echo ""
|
||||
|
||||
# Test 4: Check for Docker-related functions
|
||||
echo "4. Testing Docker functionality..."
|
||||
docker_functions=(
|
||||
"create_docker_deployment"
|
||||
"generate_docker_config"
|
||||
"DEPLOYMENT_TYPE"
|
||||
)
|
||||
|
||||
all_docker_functions_found=true
|
||||
for func in "${docker_functions[@]}"; do
|
||||
if grep -q "$func" installer.sh; then
|
||||
echo " ✓ Found: $func"
|
||||
else
|
||||
echo " ✗ Missing: $func"
|
||||
all_docker_functions_found=false
|
||||
fi
|
||||
done
|
||||
|
||||
if [ "$all_docker_functions_found" = true ]; then
|
||||
echo " ✓ PASS: All Docker functions present"
|
||||
else
|
||||
echo " ✗ FAIL: Some Docker functions missing"
|
||||
fi
|
||||
echo ""
|
||||
|
||||
# Test 5: Check for duplicate completion info (should only appear once)
|
||||
echo "5. Testing duplicate completion info removal..."
|
||||
completion_calls=$(grep -c "print_completion_info$" installer.sh)
|
||||
if [ $completion_calls -eq 1 ]; then
|
||||
echo " ✓ PASS: print_completion_info called only once"
|
||||
else
|
||||
echo " ✗ FAIL: print_completion_info called $completion_calls times"
|
||||
fi
|
||||
echo ""
|
||||
|
||||
# Test 6: Validate script structure and key sections
|
||||
echo "6. Testing script structure..."
|
||||
key_sections=(
|
||||
"get_user_input()"
|
||||
"main()"
|
||||
"uninstall()"
|
||||
"create_directories()"
|
||||
"generate_config()"
|
||||
)
|
||||
|
||||
all_sections_found=true
|
||||
for section in "${key_sections[@]}"; do
|
||||
if grep -q "$section" installer.sh; then
|
||||
echo " ✓ Found: $section"
|
||||
else
|
||||
echo " ✗ Missing: $section"
|
||||
all_sections_found=false
|
||||
fi
|
||||
done
|
||||
|
||||
if [ "$all_sections_found" = true ]; then
|
||||
echo " ✓ PASS: All key sections present"
|
||||
else
|
||||
echo " ✗ FAIL: Some key sections missing"
|
||||
fi
|
||||
echo ""
|
||||
|
||||
echo "=== Final Validation Summary ==="
|
||||
echo "All requested enhancements have been implemented:"
|
||||
echo "1. ✓ Configuration directory made selectable"
|
||||
echo "2. ✓ Duplicate output on finalization removed"
|
||||
echo "3. ✓ All emoticons and Unicode symbols removed"
|
||||
echo "4. ✓ Docker deployment option added"
|
||||
echo ""
|
||||
echo "The installer script is ready for production use!"
|
@ -1,84 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Test script to verify installer options without requiring root
|
||||
|
||||
# Extract just the user input portion from installer.sh for testing
|
||||
get_user_input() {
|
||||
echo -e "\033[0;34mInstallation Type Selection\033[0m"
|
||||
echo "Choose your preferred installation method:"
|
||||
echo ""
|
||||
echo " 1) Native installation (systemd service)"
|
||||
echo " 2) Docker deployment (docker-compose)"
|
||||
echo ""
|
||||
|
||||
while true; do
|
||||
read -p "Installation type [1]: " INSTALL_TYPE
|
||||
INSTALL_TYPE=${INSTALL_TYPE:-1}
|
||||
|
||||
case $INSTALL_TYPE in
|
||||
1)
|
||||
echo -e "\033[0;32mSelected: Native installation\033[0m"
|
||||
DEPLOYMENT_TYPE="native"
|
||||
break
|
||||
;;
|
||||
2)
|
||||
echo -e "\033[0;32mSelected: Docker deployment\033[0m"
|
||||
DEPLOYMENT_TYPE="docker"
|
||||
break
|
||||
;;
|
||||
*)
|
||||
echo -e "\033[0;31mPlease enter 1 or 2\033[0m"
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
echo ""
|
||||
echo -e "\033[0;34mConfiguration Setup\033[0m"
|
||||
echo "Please provide the following information (or press Enter for defaults):"
|
||||
echo ""
|
||||
|
||||
# System user
|
||||
read -p "System user for HMAC File Server [hmac-server]: " HMAC_USER
|
||||
HMAC_USER=${HMAC_USER:-"hmac-server"}
|
||||
|
||||
if [[ "$DEPLOYMENT_TYPE" == "native" ]]; then
|
||||
read -p "Installation directory [/opt/hmac-file-server]: " INSTALL_DIR
|
||||
INSTALL_DIR=${INSTALL_DIR:-"/opt/hmac-file-server"}
|
||||
|
||||
read -p "Configuration directory [/etc/hmac-file-server]: " CONFIG_DIR
|
||||
CONFIG_DIR=${CONFIG_DIR:-"/etc/hmac-file-server"}
|
||||
|
||||
read -p "Data directory (uploads) [/var/lib/hmac-file-server]: " DATA_DIR
|
||||
DATA_DIR=${DATA_DIR:-"/var/lib/hmac-file-server"}
|
||||
else
|
||||
read -p "Docker deployment directory [./hmac-file-server-docker]: " DOCKER_DIR
|
||||
DOCKER_DIR=${DOCKER_DIR:-"./hmac-file-server-docker"}
|
||||
|
||||
INSTALL_DIR="$DOCKER_DIR"
|
||||
CONFIG_DIR="$DOCKER_DIR/config"
|
||||
DATA_DIR="$DOCKER_DIR/data"
|
||||
fi
|
||||
|
||||
read -p "Server port [8080]: " SERVER_PORT
|
||||
SERVER_PORT=${SERVER_PORT:-"8080"}
|
||||
|
||||
read -p "Metrics port [9090]: " METRICS_PORT
|
||||
METRICS_PORT=${METRICS_PORT:-"9090"}
|
||||
|
||||
echo ""
|
||||
echo -e "\033[0;34mConfiguration Summary\033[0m"
|
||||
echo "────────────────────────────────────────────────────────────────"
|
||||
echo "Deployment Type: $DEPLOYMENT_TYPE"
|
||||
echo "System User: $HMAC_USER"
|
||||
echo "Install Dir: $INSTALL_DIR"
|
||||
echo "Config Dir: $CONFIG_DIR"
|
||||
echo "Data Dir: $DATA_DIR"
|
||||
echo "Server Port: $SERVER_PORT"
|
||||
echo "Metrics Port: $METRICS_PORT"
|
||||
echo "────────────────────────────────────────────────────────────────"
|
||||
}
|
||||
|
||||
echo "Testing installer options..."
|
||||
get_user_input
|
||||
echo ""
|
||||
echo "Test completed successfully! All options work correctly."
|
Reference in New Issue
Block a user