This commit is contained in:
kaso17 2017-08-28 11:42:37 +02:00
commit 0db4229bd4
3 changed files with 91 additions and 10 deletions

View File

@ -1,4 +1,4 @@
# Jackett
# Jackett
[![GitHub issues](https://img.shields.io/github/issues/Jackett/Jackett.svg?maxAge=60&style=flat-square)](https://github.com/Jackett/Jackett/issues)
[![GitHub pull requests](https://img.shields.io/github/issues-pr/Jackett/Jackett.svg?maxAge=60&style=flat-square)](https://github.com/Jackett/Jackett/pulls)
@ -271,14 +271,25 @@ Jackett can also be run from the command line if you would like to see log messa
Detailed instructions for [Ubuntu 14.x](http://www.htpcguides.com/install-jackett-on-ubuntu-14-x-for-custom-torrents-in-sonarr/) and [Ubuntu 15.x](http://www.htpcguides.com/install-jackett-ubuntu-15-x-for-custom-torrents-in-sonarr/)
## Installation on OSX
1. Install [Mono 4](http://www.mono-project.com/download/#download-mac) or better (version 4.8 is recommended)
* Setup ssl support by running
```
https://curl.haxx.se/ca/cacert.pem
cert-sync --user ~/Downloads/cacert.pem
```
1. Download and extract the latest `Jackett.Binaries.Mono.tar.gz` release from the [releases page](https://github.com/Jackett/Jackett/releases) and run Jackett using mono with the command `mono --debug JackettConsole.exe`.
## Installation on macOS
### Prerequisites
Install [Mono 4](http://www.mono-project.com/download/#download-mac) or better (version 4.8 is recommended).
* Setup ssl support by running
```
https://curl.haxx.se/ca/cacert.pem
cert-sync --user ~/Downloads/cacert.pem
```
### Install as service
1. Download and extract the latest `Jackett.Binaries.Mono.tar.gz` release from the [releases page](https://github.com/Jackett/Jackett/releases).
2. In Terminal, run the install script from the extracted directory using `./install_service_macos.sh`
The service will start on each logon. You can always stop it by running `launchctl unload ~/Library/LaunchAgents/org.user.Jackett.plist` from Terminal. You can start it again it using `launchctl load ~/Library/LaunchAgents/org.user.Jackett.plist`.
Logs are stored as usual under `~/.config/Jackett/log.txt`.
### Run without installing as a service
Download and extract the latest `Jackett.Binaries.Mono.tar.gz` release from the [releases page](https://github.com/Jackett/Jackett/releases) and run Jackett using mono with the command `mono --debug JackettConsole.exe`.
## Installation using Docker
Detailed instructions are available at [LinuxServer.io Jackett Docker](https://hub.docker.com/r/linuxserver/jackett/). The Jackett Docker is highly recommended, especially if you are having Mono stability issues or having issues running Mono on your system eg. QNAP, Synology. Thanks to [LinuxServer.io](https://linuxserver.io)

View File

@ -153,6 +153,9 @@
<ItemGroup>
<None Include="App.config" />
<None Include="packages.config" />
<Content Include="install_service_macos.sh">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\CurlSharp\CurlSharp.csproj">

View File

@ -0,0 +1,67 @@
#!/bin/bash
# Stop and unload the service if it's running
launchctl remove org.user.Jackett
# Check if we're running from Jackett's directory
if [ ! -f ./JackettConsole.exe ]; then
echo "Couldn't locate JackettConsole.exe. Are you running from the right directory?"
exit 1
fi
jackettdir="$(pwd)"
# Check if mono is installed
command -v mono >/dev/null 2>&1 || { echo >&2 "Jackett requires Mono but it's not installed. Aborting."; exit 1; }
monodir="$(dirname $(command -v mono))"
# Check that no other service called Jackett is already running
if [[ $(launchctl list | grep org.user.Jackett) ]]; then
echo "Jackett already seems to be running as a service. Please stop it before running this script again."
exit 1
fi
# Write the plist to LaunchAgents
cat >~/Library/LaunchAgents/org.user.Jackett.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>EnvironmentVariables</key>
<dict>
<key>PATH</key>
<string>/usr/bin:/bin:/usr/sbin:/sbin:${monodir}</string>
</dict>
<key>KeepAlive</key>
<true/>
<key>Label</key>
<string>org.user.Jackett</string>
<key>ProgramArguments</key>
<array>
<string>${monodir}/mono</string>
<string>--debug</string>
<string>JackettConsole.exe</string>
<string>--NoRestart</string>
</array>
<key>RunAtLoad</key>
<true/>
<key>WorkingDirectory</key>
<string>${jackettdir}</string>
</dict>
</plist>
EOL
# 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 "Agent successfully installed and launched!"
else
cat << EOL
Could not launch agent. The installation might have failed.
Please open an issue on https://github.com/Jackett/Jackett/issues and paste following information:
Mono directory: \`${monodir}\`
Jackett directory: \`${jackettdir}\`
EOL
fi