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
|
NC="$(printf '\033[0m')" # No Color
|
||||||
|
|
||||||
# Stop and unload the service if it's running
|
# 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
|
# Move working directory to Jackett's
|
||||||
cd "$(dirname "$0")"
|
cd "$(dirname "$0")"
|
||||||
|
@ -55,18 +55,20 @@ cat >~/Library/LaunchAgents/org.user.Jackett.plist <<EOL
|
||||||
EOL
|
EOL
|
||||||
|
|
||||||
# Un-quarantine all dylib and DLL files
|
# 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)" 2>/dev/null
|
||||||
qstr="$(xattr -p com.apple.quarantine jackett)"
|
if [[ $qstr ]]; then
|
||||||
qstr="00c1${qstr:4}"
|
echo "Removing Jackett executable and all .dylib and .dll files from quarantine..."
|
||||||
xattr -w com.apple.quarantine $qstr jackett
|
qstr="00c1${qstr:4}"
|
||||||
xattr -w com.apple.quarantine $qstr *.{dylib,dll}
|
xattr -w com.apple.quarantine $qstr jackett
|
||||||
|
xattr -w com.apple.quarantine $qstr *.{dylib,dll}
|
||||||
|
fi
|
||||||
|
|
||||||
# Run the agent
|
# Run the agent
|
||||||
launchctl load ~/Library/LaunchAgents/org.user.Jackett.plist
|
launchctl load ~/Library/LaunchAgents/org.user.Jackett.plist
|
||||||
|
|
||||||
# Check that it's running
|
# Check that it's running
|
||||||
if [[ $(launchctl list | grep org.user.Jackett) ]]; then
|
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
|
else
|
||||||
cat << EOL
|
cat << EOL
|
||||||
${BOLDRED}ERROR${NC}: Could not launch agent. The installation might have failed.
|
${BOLDRED}ERROR${NC}: Could not launch agent. The installation might have failed.
|
||||||
|
|
Loading…
Reference in a new issue