Rewrite ALCPlugFix in Swift.

This commit is contained in:
Echo Hou
2020-03-07 13:03:18 +08:00
parent 63da3d330a
commit 678e500d6d
4 changed files with 16 additions and 17 deletions
Binary file not shown.
@@ -2,19 +2,18 @@
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>KeepAlive</key>
<true/>
<key>Label</key>
<string>good.win.ALCPlugFix</string>
<key>ProgramArguments</key>
<array>
<key>KeepAlive</key>
<true/>
<key>Label</key>
<string>com.echo.ALCPlugFix</string>
<key>ProgramArguments</key>
<array>
<string>/usr/bin/ALCPlugFix</string>
</array>
<key>RunAtLoad</key>
<true/>
<key>ServiceIPC</key>
<false/>
<!--Shuold be directory that hda-verb at-->
</array>
<key>RunAtLoad</key>
<true/>
<key>ServiceIPC</key>
<false/>
<key>WorkingDirectory</key>
<string>/usr/bin/</string>
</dict>
+2 -2
View File
@@ -2,7 +2,7 @@
DAEMON_PATH=/Library/LaunchDaemons/
BIN_PATH=/usr/bin/
DAEMON_FILE=good.win.ALCPlugFix.plist
DAEMON_FILE=com.echo.ALCPlugFix.plist
VERB_FILE=hda-verb
FIX_FILE=ALCPlugFix
@@ -24,7 +24,7 @@ fi
# copy over the files to their respective locations (overwrite automatically if files exist)
sudo cp -f ALCPlugFix $BIN_PATH
sudo cp -f hda-verb $BIN_PATH
sudo cp -f good.win.ALCPlugFix.plist $DAEMON_PATH
sudo cp -f com.echo.ALCPlugFix.plist $DAEMON_PATH
# set permissions and ownership
sudo chmod 755 $BIN_PATH$FIX_FILE
+3 -3
View File
@@ -11,9 +11,9 @@ fi
sudo rm /usr/bin/ALCPlugFix
sudo rm /usr/bin/hda-verb
sudo launchctl unload -w /Library/LaunchDaemons/good.win.ALCPlugFix.plist
sudo launchctl remove good.win.ALCPlugFix
sudo rm /Library/LaunchDaemons/good.win.ALCPlugFix.plist
sudo launchctl unload -w /Library/LaunchDaemons/com.echo.ALCPlugFix.plist
sudo launchctl remove com.echo.ALCPlugFix
sudo rm /Library/LaunchDaemons/com.echo.ALCPlugFix.plist
echo "Done!"
exit 0