Change video storage directory from /storage to /mnt/nfs_share

- Update StorageConfig default base_path in core/config.py
- Update base_path and camera storage_paths in config.json and config.compose.json
- Update Docker Compose volume mounts to use /mnt/nfs_share
- Update start_system.sh to create /mnt/nfs_share directory
- Update convert_avi_to_mp4.sh to use new NFS path
- Update all documentation files to reflect new storage paths
- Videos now stored on NFS server at 192.168.1.249:/mnt/nfs_share/
This commit is contained in:
salirezav
2025-10-14 16:28:00 -04:00
parent e675423258
commit 98c93f9e0e
17 changed files with 48 additions and 50 deletions

View File

@@ -1,7 +1,7 @@
#!/bin/bash
# Script to convert AVI files to MP4 using H.264 codec
# Converts files in /storage directory and saves them in the same location
# Converts files in /mnt/nfs_share directory and saves them in the same location
# Colors for output
RED='\033[0;31m'
@@ -54,19 +54,19 @@ if ! command -v ffmpeg &> /dev/null; then
exit 1
fi
# Check if /storage directory exists
if [ ! -d "/storage" ]; then
print_error "/storage directory does not exist."
# Check if /mnt/nfs_share directory exists
if [ ! -d "/mnt/nfs_share" ]; then
print_error "/mnt/nfs_share directory does not exist."
exit 1
fi
# Check if we have read/write permissions to /storage
if [ ! -r "/storage" ] || [ ! -w "/storage" ]; then
print_error "No read/write permissions for /storage directory."
# Check if we have read/write permissions to /mnt/nfs_share
if [ ! -r "/mnt/nfs_share" ] || [ ! -w "/mnt/nfs_share" ]; then
print_error "No read/write permissions for /mnt/nfs_share directory."
exit 1
fi
print_status "Starting AVI to MP4 conversion in /storage directory..."
print_status "Starting AVI to MP4 conversion in /mnt/nfs_share directory..."
# Counter variables
total_files=0
@@ -74,7 +74,7 @@ converted_files=0
skipped_files=0
failed_files=0
# Find all AVI files in /storage directory (including subdirectories)
# Find all AVI files in /mnt/nfs_share directory (including subdirectories)
while IFS= read -r -d '' avi_file; do
total_files=$((total_files + 1))
@@ -163,7 +163,7 @@ while IFS= read -r -d '' avi_file; do
echo # Add blank line between files
done < <(find /storage -name "*.avi" -type f -print0)
done < <(find /mnt/nfs_share -name "*.avi" -type f -print0)
# Print summary
echo
@@ -174,7 +174,7 @@ echo "Skipped (MP4 exists): $skipped_files"
echo "Failed conversions: $failed_files"
if [ $total_files -eq 0 ]; then
print_warning "No AVI files found in /storage directory."
print_warning "No AVI files found in /mnt/nfs_share directory."
elif [ $failed_files -eq 0 ] && [ $converted_files -gt 0 ]; then
print_success "All conversions completed successfully!"
elif [ $failed_files -gt 0 ]; then