Python Scripts in Virtual Environments in Background macOS
Hello all.
I have successfully driven myself nuts with this. Title says what I'm trying to accomplish. Using 2 services - 1. wiki Drazzilb08/daps and 2. local Kometa.
These install pretty similarly and are invoked similarly but I can't seem to blend them together. I have tried too many things to enumerate here but they include: running the python command with nohup, running with disown, making a LaunchAgent plist that calls a sh script to run the commands, all to no avail. I have tried specifically also to adapt the Kometa plist to the daps but I don't understand what this one does so...
The plist I'm trying to understand
<?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.YOUR_USERNAME.kometa</string>
<key>ProgramArguments</key>
<array>
<string>sh</string>
<string>-c</string>
<string>kometa-venv/bin/python kometa.py --config /path/to/kometa-config/config.yml</string>
</array>
<key>UserName</key>
<string>YOUR_USERNAME</string>
<key>WorkingDirectory</key>
<string>/PATH/TO/KOMETA</string>
</dict>
</plist>
Which gets invoked peculiarly to me
cd ~/Library/LaunchAgents/
launchctl bootstrap gui/YOUR-USER-ID com.YOUR_USERNAME.kometa.plist
And doesn't seem to work. How can I best accomplish 2 python scripts in background in their respective virtual environments at startup running macOS 14.7.2
I'd appreciate any advice!
Mac mini, macOS 14.7