Skip to content

Instantly share code, notes, and snippets.

@saamerm
Created October 3, 2025 21:12
Show Gist options
  • Save saamerm/010215ab8c207cc4d7e96a7b09d9e130 to your computer and use it in GitHub Desktop.
Save saamerm/010215ab8c207cc4d7e96a7b09d9e130 to your computer and use it in GitHub Desktop.
Shell script to stop the auto restart functionality on Mac OS for any app
#!/bin/bash
# Shell script to stop the auto start functionality as shown here https://gist.github.com/saamerm/f83a6573776c696e6539ae4432542746
PLIST=~/Library/LaunchAgents/com.confcap.autorestart.plist
cat > "$PLIST" <<EOL
<?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.confcap.autorestart</string>
<key>ProgramArguments</key>
<array>
<string>/Applications/ConfCap.app/Contents/MacOS/ConfCap</string>
</array>
<key>KeepAlive</key>
<false/>
<key>RunAtLoad</key>
<false/>
</dict>
</plist>
EOL
launchctl unload "$PLIST" 2>/dev/null
launchctl load "$PLIST"
echo "✅ Auto-restart enabled for ConfCap"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment