add linux uninstall script (#15291)

Co-authored-by: ilike2burnthing <59480337+ilike2burnthing@users.noreply.github.com>
This commit is contained in:
slrslr 2024-05-06 06:03:15 +02:00 committed by GitHub
parent c8cf4cf37c
commit fb354844bf
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 62 additions and 7 deletions

View File

@ -736,7 +736,7 @@ When installed as a service the tray icon acts as a way to open/start/stop Jacke
Jackett can also be run from the command line if you would like to see log messages (Ensure the server isn't already running from the tray/service). This can be done by using "JackettConsole.exe" (for Command Prompt), found in the Jackett data folder: "%ProgramData%\Jackett".
## Install on Linux (AMDx64)
## Installation on Linux (AMDx64)
On most operating systems all the required dependencies will already be present. In case they are not, you can refer to this page https://github.com/dotnet/core/blob/master/Documentation/linux-prereqs.md
### Install as service
@ -756,7 +756,7 @@ Download and extract the latest `Jackett.Binaries.LinuxAMDx64.tar.gz` release fr
If you want to run it with a user without a /home directory you need to add `Environment=XDG_CONFIG_HOME=/path/to/folder` to your systemd file, this folder will be used to store your config files.
## Install on Linux (ARMv7 or above)
## Installation on Linux (ARMv7 or above)
On most operating systems all the required dependencies will already be present. In case they are not, you can refer to this page https://github.com/dotnet/core/blob/master/Documentation/linux-prereqs.md
### Install as service
@ -793,9 +793,8 @@ On a CentOS/RedHat 7 system: [jewflix.jackett](https://galaxy.ansible.com/jewfli
On an Ubuntu 16 system: [chrisjohnson00.jackett](https://galaxy.ansible.com/chrisjohnson00/jackett)
### Installation on Linux or macOS via Homebrew
[Homebrew Formulae - Jackett](https://formulae.brew.sh/formula/jackett)
## Unistallation on Linux
`wget https://raw.githubusercontent.com/Jackett/Jackett/master/uninstall_service_systemd.sh --quiet -O -|sudo bash`
## Installation on macOS
@ -815,6 +814,15 @@ Logs are stored as usual under `~/.config/Jackett/log.txt`.
Download and extract the latest `Jackett.Binaries.macOS.tar.gz` or `Jackett.Binaries.macOSARM64.tar.gz` release from the [releases page](https://github.com/Jackett/Jackett/releases) and run Jackett with the command `./jackett`.
## Unistallation on macOS
`curl -sSL https://raw.githubusercontent.com/Jackett/Jackett/master/uninstall_jackett_macos| bash`
## Installation on Linux or macOS via Homebrew
[Homebrew Formulae - Jackett](https://formulae.brew.sh/formula/jackett)
## 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 e.g. QNAP, Synology. Thanks to [LinuxServer.io](https://linuxserver.io)

View File

@ -24,7 +24,7 @@ if systemctl is-active --quiet "${JACKETT_SERVICE}"; then
if systemctl stop "${JACKETT_SERVICE}"; then
echo "Service '${JACKETT_SERVICE}' stopped"
else
echo "${BOLDRED}ERROR${NC}: The service '${JACKETT_SERVICE}' Can not be stopped"
echo "${BOLDRED}ERROR${NC}: The service '${JACKETT_SERVICE}' can not be stopped"
exit 1
fi

View File

@ -24,7 +24,7 @@ if systemctl is-active --quiet "${JACKETT_SERVICE}"; then
if systemctl stop "${JACKETT_SERVICE}"; then
echo "Service '${JACKETT_SERVICE}' stopped"
else
echo "${BOLDRED}ERROR${NC}: The service '${JACKETT_SERVICE}' Can not be stopped"
echo "${BOLDRED}ERROR${NC}: The service '${JACKETT_SERVICE}' can not be stopped"
exit 1
fi

View File

@ -0,0 +1,47 @@
#!/bin/bash
# Define the directory where Jackett was installed
INSTALL_DIR1="/opt/Jackett"
INSTALL_DIR2="/opt/jackett"
# Define the systemd service file for Jackett
JACKETT_SERVICE_PATH="/etc/systemd/system/jackett.service"
# Ensure the script is running with superuser privileges
if [ "$(id -u)" -ne 0 ]; then
echo "This script must be run as root. Try using 'sudo bash $0'."
exit 1
fi
echo "Starting Jackett uninstallation..."
# Stop the Jackett service
echo "Stopping the Jackett service..."
if systemctl stop jackett.service; then
echo "Jackett service stopped successfully."
else
echo "Failed to stop the Jackett service. It may not have been running."
fi
# Disable the Jackett service
echo "Disabling the Jackett service..."
if systemctl disable jackett.service; then
echo "Jackett service disabled successfully."
else
echo "Failed to disable the Jackett service."
fi
# Remove the systemd service file
echo "Removing the systemd service file..."
rm -vf "$JACKETT_SERVICE_PATH"
# Reload systemd to remove traces of the Jackett service
echo "Reloading systemd daemon..."
systemctl daemon-reload
# Remove the Jackett installation directory
echo "Removing Jackett installation directory..."
rm -rf "$INSTALL_DIR1"
rm -rf "$INSTALL_DIR2"
echo "Jackett uninstallation finished."