mirror of
https://github.com/Jackett/Jackett
synced 2025-01-03 13:46:10 +00:00
macos: Update install_service_macos (#8933)
This commit is contained in:
parent
e0310f2367
commit
f0a4766c83
1 changed files with 9 additions and 7 deletions
|
@ -6,7 +6,7 @@ BOLDGREEN="$(printf '\033[1;32m')"
|
|||
NC="$(printf '\033[0m')" # No Color
|
||||
|
||||
# Stop and unload the service if it's running
|
||||
launchctl remove org.user.Jackett
|
||||
launchctl unload ~/Library/LaunchAgents/org.user.Jackett.plist &>/dev/null
|
||||
|
||||
# Move working directory to Jackett's
|
||||
cd "$(dirname "$0")"
|
||||
|
@ -55,18 +55,20 @@ cat >~/Library/LaunchAgents/org.user.Jackett.plist <<EOL
|
|||
EOL
|
||||
|
||||
# Un-quarantine all dylib and DLL files
|
||||
echo "Removing Jackett executable and all .dylib and .dll files from quarantine..."
|
||||
qstr="$(xattr -p com.apple.quarantine jackett)"
|
||||
qstr="00c1${qstr:4}"
|
||||
xattr -w com.apple.quarantine $qstr jackett
|
||||
xattr -w com.apple.quarantine $qstr *.{dylib,dll}
|
||||
qstr="$(xattr -p com.apple.quarantine jackett)" 2>/dev/null
|
||||
if [[ $qstr ]]; then
|
||||
echo "Removing Jackett executable and all .dylib and .dll files from quarantine..."
|
||||
qstr="00c1${qstr:4}"
|
||||
xattr -w com.apple.quarantine $qstr jackett
|
||||
xattr -w com.apple.quarantine $qstr *.{dylib,dll}
|
||||
fi
|
||||
|
||||
# Run the agent
|
||||
launchctl load ~/Library/LaunchAgents/org.user.Jackett.plist
|
||||
|
||||
# Check that it's running
|
||||
if [[ $(launchctl list | grep org.user.Jackett) ]]; then
|
||||
echo "${BOLDGREEN}Agent successfully installed and launched!${NC}"
|
||||
echo "${BOLDGREEN}Agent successfully installed and launched!${NC}"
|
||||
else
|
||||
cat << EOL
|
||||
${BOLDRED}ERROR${NC}: Could not launch agent. The installation might have failed.
|
||||
|
|
Loading…
Reference in a new issue