#!/bin/bash # Launch the folder watcher service. set -e API_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" BASE="$( cd "$API_DIR/.." && pwd )" # Try to activate venv if it exists, otherwise use system python if [ -d "$BASE/venv" ]; then source "$BASE/venv/bin/activate" fi cd "$API_DIR" exec python3 watcher.py