Chore: rename api->camera-management-api and web->management-dashboard-web-app; update compose, ignore, README references
This commit is contained in:
29
camera-management-api/container_init.sh
Executable file
29
camera-management-api/container_init.sh
Executable file
@@ -0,0 +1,29 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Container initialization script for USDA Vision Camera System
|
||||
# This script sets up and starts the systemd service in a container environment
|
||||
|
||||
echo "🐳 Container Init - USDA Vision Camera System"
|
||||
echo "============================================="
|
||||
|
||||
# Start systemd if not already running (for containers)
|
||||
if ! pgrep systemd > /dev/null; then
|
||||
echo "🔧 Starting systemd..."
|
||||
exec /sbin/init &
|
||||
sleep 5
|
||||
fi
|
||||
|
||||
# Setup the service if not already installed
|
||||
if [ ! -f "/etc/systemd/system/usda-vision-camera.service" ]; then
|
||||
echo "📦 Setting up USDA Vision Camera service..."
|
||||
cd /home/alireza/USDA-vision-cameras
|
||||
sudo ./setup_service.sh
|
||||
fi
|
||||
|
||||
# Start the service
|
||||
echo "🚀 Starting USDA Vision Camera service..."
|
||||
sudo systemctl start usda-vision-camera
|
||||
|
||||
# Follow the logs
|
||||
echo "📋 Following service logs (Ctrl+C to exit)..."
|
||||
sudo journalctl -u usda-vision-camera -f
|
||||
Reference in New Issue
Block a user