mirror of https://github.com/tteck/Proxmox.git
Compare commits
No commits in common. "f9b9b560f1e20a7e4f15aec82f455c8a5a5ca83e" and "a82f235e3c52e8ec1291974b8d4d246fbb5a1b37" have entirely different histories.
f9b9b560f1
...
a82f235e3c
|
@ -4,15 +4,6 @@
|
||||||
|
|
||||||
- All LXC instances created using this repository come pre-installed with Midnight Commander, which is a command-line tool (`mc`) that offers a user-friendly file and directory management interface for the terminal environment.
|
- All LXC instances created using this repository come pre-installed with Midnight Commander, which is a command-line tool (`mc`) that offers a user-friendly file and directory management interface for the terminal environment.
|
||||||
|
|
||||||
## 2024-01-03
|
|
||||||
|
|
||||||
### Changed
|
|
||||||
|
|
||||||
- **Sonarr LXC**
|
|
||||||
- Breaking Change
|
|
||||||
- Complete recode
|
|
||||||
- https://github.com/tteck/Proxmox/discussions/1738#discussioncomment-8005107
|
|
||||||
|
|
||||||
## 2024-01-01
|
## 2024-01-01
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
|
|
27
ct/sonarr.sh
27
ct/sonarr.sh
|
@ -52,16 +52,23 @@ function default_settings() {
|
||||||
|
|
||||||
function update_script() {
|
function update_script() {
|
||||||
header_info
|
header_info
|
||||||
if [[ ! -d /opt/Sonarr ]]; then msg_error "No ${APP} Installation Found!"; exit; fi
|
if [[ ! -f /etc/apt/sources.list.d/sonarr.list ]]; then msg_error "No ${APP} Installation Found!"; exit; fi
|
||||||
msg_info "Updating $APP v4"
|
read -r -p "Are you updating Sonarr v4? <y/N> " prompt
|
||||||
systemctl stop sonarr.service
|
if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then
|
||||||
wget -q -O SonarrV4.tar.gz 'https://services.sonarr.tv/v1/download/main/latest?version=4&os=linux&arch=x64'
|
msg_info "Updating $APP v4"
|
||||||
tar -xzf SonarrV4.tar.gz
|
systemctl stop sonarr.service
|
||||||
rm -rf /opt/Sonarr
|
wget -q -O SonarrV4.tar.gz 'https://services.sonarr.tv/v1/download/develop/latest?version=4&os=linux'
|
||||||
mv Sonarr /opt
|
tar -xzf SonarrV4.tar.gz
|
||||||
rm -rf SonarrV4.tar.gz
|
cp -r Sonarr/* /usr/lib/sonarr/bin
|
||||||
systemctl start sonarr.service
|
rm -rf Sonarr SonarrV4.tar.gz
|
||||||
msg_ok "Updated $APP v4"
|
systemctl start sonarr.service
|
||||||
|
msg_ok "Updated $APP v4"
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
msg_info "Updating $APP LXC"
|
||||||
|
apt-get update &>/dev/null
|
||||||
|
apt-get -y upgrade &>/dev/null
|
||||||
|
msg_ok "Updated $APP LXC"
|
||||||
exit
|
exit
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -17,41 +17,28 @@ msg_info "Installing Dependencies"
|
||||||
$STD apt-get install -y curl
|
$STD apt-get install -y curl
|
||||||
$STD apt-get install -y sudo
|
$STD apt-get install -y sudo
|
||||||
$STD apt-get install -y mc
|
$STD apt-get install -y mc
|
||||||
$STD apt-get install -y sqlite3
|
$STD apt-get install -y gnupg
|
||||||
|
$STD apt-get install -y ca-certificates
|
||||||
msg_ok "Installed Dependencies"
|
msg_ok "Installed Dependencies"
|
||||||
|
|
||||||
msg_info "Installing Sonarr v4"
|
read -r -p "Would you like to install v4 (experimental)? <y/N> " prompt
|
||||||
$STD groupadd media
|
msg_info "Installing Sonarr"
|
||||||
$STD adduser --system --no-create-home --ingroup media sonarr
|
wget -qO /etc/apt/trusted.gpg.d/sonarr-repo.asc "https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x2009837cbffd68f45bc180471f4f90de2a9b4bf8"
|
||||||
mkdir -p /var/lib/sonarr/
|
echo "deb https://apt.sonarr.tv/debian testing-main main" >/etc/apt/sources.list.d/sonarr.list
|
||||||
chown -R sonarr:media /var/lib/sonarr/
|
$STD apt-get update
|
||||||
chmod 775 /var/lib/sonarr/
|
DEBIAN_FRONTEND=noninteractive apt-get -o Dpkg::Options::="--force-confold" install -qqy sonarr &>/dev/null
|
||||||
wget -q -O SonarrV4.tar.gz 'https://services.sonarr.tv/v1/download/main/latest?version=4&os=linux&arch=x64'
|
if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then
|
||||||
tar -xzf SonarrV4.tar.gz
|
systemctl stop sonarr.service
|
||||||
mv Sonarr /opt
|
wget -q -O SonarrV4.tar.gz 'https://services.sonarr.tv/v1/download/develop/latest?version=4&os=linux'
|
||||||
rm -rf SonarrV4.tar.gz
|
tar -xzf SonarrV4.tar.gz
|
||||||
|
cp -r Sonarr/* /usr/lib/sonarr/bin
|
||||||
msg_ok "Installed Sonarr v4"
|
rm -rf Sonarr SonarrV4.tar.gz
|
||||||
|
sed -i 's|ExecStart=/usr/bin/mono --debug /usr/lib/sonarr/bin/Sonarr.exe -nobrowser -data=/var/lib/sonarr|ExecStart=/usr/lib/sonarr/bin/Sonarr -nobrowser -data=/var/lib/sonarr|' /lib/systemd/system/sonarr.service
|
||||||
msg_info "Creating Service"
|
sed -i 's/\(User=\|Group=\).*/\1root/' /lib/systemd/system/sonarr.service
|
||||||
cat <<EOF >/etc/systemd/system/sonarr.service
|
systemctl daemon-reload
|
||||||
[Unit]
|
systemctl start sonarr.service
|
||||||
Description=Sonarr Daemon
|
fi
|
||||||
After=syslog.target network.target
|
msg_ok "Installed Sonarr"
|
||||||
[Service]
|
|
||||||
User=sonarr
|
|
||||||
Group=media
|
|
||||||
UMask=0002
|
|
||||||
Type=simple
|
|
||||||
ExecStart=/opt/Sonarr/Sonarr -nobrowser -data=/var/lib/sonarr/
|
|
||||||
TimeoutStopSec=20
|
|
||||||
KillMode=process
|
|
||||||
Restart=on-failure
|
|
||||||
[Install]
|
|
||||||
WantedBy=multi-user.target
|
|
||||||
EOF
|
|
||||||
systemctl enable -q --now sonarr.service
|
|
||||||
msg_ok "Created Service"
|
|
||||||
|
|
||||||
motd_ssh
|
motd_ssh
|
||||||
customize
|
customize
|
||||||
|
|
Loading…
Reference in New Issue