26 lines
822 B
Bash
Executable File
26 lines
822 B
Bash
Executable File
#!/bin/bash
|
|
# AYN Antivirus Dashboard Launcher (for launchd/systemd)
|
|
set -euo pipefail
|
|
|
|
SCRIPT_DIR="$(cd "$(dirname "$0")/.." && pwd)"
|
|
DATA_DIR="${AYN_DATA_DIR:-$HOME/ayn-antivirus-data}"
|
|
|
|
mkdir -p "$DATA_DIR" "$DATA_DIR/quarantine" "$DATA_DIR/logs"
|
|
|
|
export PYTHONPATH="$SCRIPT_DIR:${PYTHONPATH:-}"
|
|
|
|
exec /usr/bin/python3 -c "
|
|
import os
|
|
data_dir = os.environ.get('AYN_DATA_DIR', os.path.expanduser('~/ayn-antivirus-data'))
|
|
os.makedirs(data_dir, exist_ok=True)
|
|
from ayn_antivirus.config import Config
|
|
from ayn_antivirus.dashboard.server import DashboardServer
|
|
c = Config()
|
|
c.dashboard_host = '0.0.0.0'
|
|
c.dashboard_port = 7777
|
|
c.dashboard_db_path = os.path.join(data_dir, 'dashboard.db')
|
|
c.db_path = os.path.join(data_dir, 'signatures.db')
|
|
c.quarantine_path = os.path.join(data_dir, 'quarantine')
|
|
DashboardServer(c).run()
|
|
"
|