summaryrefslogtreecommitdiff
path: root/fimon/setup.sh
blob: 751819d365144e583c5adb94989448d46b455a49 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#!/bin/bash

# File Monitor Setup Script

echo "Setting up File Monitor..."

# Check if Python 3 is installed
if ! command -v python3 &> /dev/null; then
    echo "Error: Python 3 is required but not installed."
    exit 1
fi

# Check if pip is installed
if ! command -v pip3 &> /dev/null; then
    echo "Error: pip3 is required but not installed."
    exit 1
fi

# Install required Python packages
echo "Installing required packages..."
pip3 install -r requirements.txt

# Make the script executable
chmod +x file_monitor.py

# Create a sample config if it doesn't exist
if [ ! -f "config.ini" ]; then
    echo "Creating sample configuration file..."
    python3 file_monitor.py --config config.ini --create-config
    echo ""
    echo "Configuration file created at: config.ini"
    echo "Please edit this file with your specific settings before running the monitor."
else
    echo "Configuration file already exists: config.ini"
fi

echo ""
echo "Setup complete!"
echo ""
echo "To run the file monitor:"
echo "  python3 file_monitor.py -c config.ini"
echo ""
echo "Make sure to edit config.ini with your specific settings first."