Ctrl K
ComunidadGuías…

deploy/com.stt.watchdog.plist

Rama main · réplica de lectura del repositorio original.

Archivo original ↗Preguntar a KiBot
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN"
    "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>Label</key>
    <string>com.stt.watchdog</string>

    <!-- Compiled binary install: replace the two lines below with just the binary path -->
    <!-- <string>/path/to/STT-Watchdog</string>                                        -->
    <key>ProgramArguments</key>
    <array>
        <string>INSTALL_DIR/.venv/bin/python3</string>
        <string>INSTALL_DIR/stt/watchdog.py</string>
        <string>--headless</string>
    </array>

    <key>WorkingDirectory</key>
    <string>INSTALL_DIR</string>

    <!-- launchd's default soft maxfiles is 256, which the server exhausted
         in the field (STT-2D/STT-2E). Soft only: a HardResourceLimits entry
         would lower the hard limit from unlimited. -->
    <key>SoftResourceLimits</key>
    <dict>
        <key>NumberOfFiles</key>
        <integer>10240</integer>
    </dict>

    <key>RunAtLoad</key>
    <true/>

    <key>KeepAlive</key>
    <true/>

    <key>EnvironmentVariables</key>
    <dict>
        <key>PYTHONUNBUFFERED</key>
        <string>1</string>
    </dict>

    <!-- LOG_DIR is the data dir's logs/ (install.sh substitutes and creates it). Not
         INSTALL_DIR/logs, which a fresh clone does not have, so launchd could not open
         the file and never started the job. And not watchdog.log, which the watchdog
         writes itself: stdout there doubled every line. -->
    <key>StandardOutPath</key>
    <string>LOG_DIR/watchdog.stdout.log</string>

    <key>StandardErrorPath</key>
    <string>LOG_DIR/watchdog.stdout.log</string>
</dict>
</plist>