Compare commits

..

9 Commits

Author SHA1 Message Date
tteckster 04647388bf
Update tdarr.sh
default Debian 12
2023-11-09 18:23:14 -05:00
tteckster 92b50cf36f
Update sonarr.sh
add update for v4
2023-11-09 17:52:48 -05:00
tteckster 6463c85f05
Update sonarr-install.sh
change v4 path
2023-11-09 17:46:25 -05:00
Scott Russell 2bfd58c92c
Update update-lxcs.sh (#2018)
Add -q to apt-get to avoid terminal noise in the logs
2023-11-09 11:59:48 -05:00
tteckster ec2b16970f
Update CHANGELOG.md 2023-11-09 11:01:08 -05:00
tteckster c9d255012c
Update agentdvr-install.sh 2023-11-09 10:44:33 -05:00
tteckster 813771cde4
Update agentdvr.sh 2023-11-09 10:43:50 -05:00
tteckster e874e9c5cc
Create agentdvr-install.sh 2023-11-09 10:35:01 -05:00
tteckster 9af470895c
Create agentdvr.sh 2023-11-09 10:33:56 -05:00
7 changed files with 150 additions and 5 deletions

View File

@ -5,6 +5,13 @@
- 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.
## 2023-11-9
### Changed
- **AgentDVR LXC**
- NEW Script
## 2023-11-8
### Changed

66
ct/agentdvr.sh Normal file
View File

@ -0,0 +1,66 @@
#!/usr/bin/env bash
source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func)
# Copyright (c) 2021-2023 tteck
# Author: tteck (tteckster)
# License: MIT
# https://github.com/tteck/Proxmox/raw/main/LICENSE
function header_info {
clear
cat <<"EOF"
___ __ ____ _ ______
/ | ____ ____ ____ / /_/ __ \ | / / __ \
/ /| |/ __ `/ _ \/ __ \/ __/ / / / | / / /_/ /
/ ___ / /_/ / __/ / / / /_/ /_/ /| |/ / _, _/
/_/ |_\__, /\___/_/ /_/\__/_____/ |___/_/ |_|
/____/
EOF
}
header_info
echo -e "Loading..."
APP="AgentDVR"
var_disk="8"
var_cpu="2"
var_ram="2048"
var_os="ubuntu"
var_version="22.04"
variables
color
catch_errors
function default_settings() {
CT_TYPE="0"
PW=""
CT_ID=$NEXTID
HN=$NSAPP
DISK_SIZE="$var_disk"
CORE_COUNT="$var_cpu"
RAM_SIZE="$var_ram"
BRG="vmbr0"
NET="dhcp"
GATE=""
DISABLEIP6="no"
MTU=""
SD=""
NS=""
MAC=""
VLAN=""
SSH="no"
VERB="no"
echo_default
}
function update_script() {
header_info
if [[ ! -d /opt/agentdvr ]]; then msg_error "No ${APP} Installation Found!"; exit; fi
msg_error "There is currently no update path available."
exit
}
start
build_container
description
msg_ok "Completed Successfully!\n"
echo -e "${APP}${CL} should be reachable by going to the following URL.
${BL}http://${IP}:8090${CL} \n"

View File

@ -53,6 +53,16 @@ function default_settings() {
function update_script() {
header_info
if [[ ! -f /etc/apt/sources.list.d/sonarr.list ]]; then msg_error "No ${APP} Installation Found!"; exit; fi
read -r -p "Are you updating Sonarr v4? <y/N> " prompt
if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then
systemctl stop sonarr.service
wget -q -O SonarrV4.tar.gz 'https://services.sonarr.tv/v1/download/develop/latest?version=4&os=linux'
tar -xzf SonarrV4.tar.gz
cp -r Sonarr/* /usr/lib/sonarr/bin
rm -rf Sonarr SonarrV4.tar.gz
systemctl start sonarr.service
exit
fi
msg_info "Updating $APP LXC"
apt-get update &>/dev/null
apt-get -y upgrade &>/dev/null

View File

@ -23,7 +23,7 @@ var_disk="4"
var_cpu="2"
var_ram="2048"
var_os="debian"
var_version="11"
var_version="12"
variables
color
catch_errors

View File

@ -0,0 +1,62 @@
#!/usr/bin/env bash
# Copyright (c) 2021-2023 tteck
# Author: tteck (tteckster)
# License: MIT
# https://github.com/tteck/Proxmox/raw/main/LICENSE
source /dev/stdin <<< "$FUNCTIONS_FILE_PATH"
color
verb_ip6
catch_errors
setting_up_container
network_check
update_os
msg_info "Installing Dependencies"
$STD apt-get install -y curl
$STD apt-get install -y sudo
$STD apt-get install -y mc
$STD apt-get install -y unzip
$STD apt-get install -y apt-transport-https
$STD apt-get install -y alsa-utils
$STD apt-get install -y libxext-dev
$STD apt-get install -y fontconfig
msg_ok "Installed Dependencies"
msg_info "Installing AgentDVR"
mkdir -p /opt/agentdvr/agent
RELEASE=$(curl -s "https://www.ispyconnect.com/api/Agent/DownloadLocation4?platform=Linux64&fromVersion=0" | grep -o 'https://.*\.zip')
cd /opt/agentdvr/agent
wget -q $RELEASE
$STD unzip Agent_Linux64*.zip
rm -rf Agent_Linux64*.zip
chmod +x ./Agent
msg_ok "Installed AgentDVR"
msg_info "Creating Service"
cat <<EOF >/etc/systemd/system/agentdvr.service
[Unit]
Description=AgentDVR
[Service]
WorkingDirectory=/opt/agentdvr/agent
ExecStart=/opt/agentdvr/agent/./Agent
Environment="MALLOC_TRIM_THRESHOLD_=100000"
SyslogIdentifier=AgentDVR
Restart=always
RestartSec=5
[Install]
WantedBy=multi-user.target
EOF
systemctl enable -q --now agentdvr.service
msg_ok "Created Service"
motd_ssh
customize
msg_info "Cleaning up"
$STD apt-get autoremove
$STD apt-get autoclean
msg_ok "Cleaned"

View File

@ -29,10 +29,10 @@ $STD apt-get update
DEBIAN_FRONTEND=noninteractive apt-get -o Dpkg::Options::="--force-confold" install -qqy sonarr &>/dev/null
if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then
systemctl stop sonarr.service
wget -q https://download.sonarr.tv/v4/develop/4.0.0.697/Sonarr.develop.4.0.0.697.linux-x64.tar.gz
tar -xzf Sonarr.develop.4.0.0.697.linux-x64.tar.gz
wget -q -O SonarrV4.tar.gz 'https://services.sonarr.tv/v1/download/develop/latest?version=4&os=linux'
tar -xzf SonarrV4.tar.gz
cp -r Sonarr/* /usr/lib/sonarr/bin
rm -rf Sonarr Sonarr.develop.4.0.0.697.linux-x64.tar.gz
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
sed -i 's/\(User=\|Group=\).*/\1root/' /lib/systemd/system/sonarr.service
systemctl daemon-reload

View File

@ -67,7 +67,7 @@ function update_container() {
alpine) pct exec "$container" -- ash -c "apk update && apk upgrade" ;;
archlinux) pct exec "$container" -- bash -c "pacman -Syyu --noconfirm" ;;
fedora | rocky | centos | alma) pct exec "$container" -- bash -c "dnf -y update && dnf -y upgrade" ;;
ubuntu | debian | devuan) pct exec "$container" -- bash -c "apt-get update 2>/dev/null | grep 'packages.*upgraded'; apt list --upgradable && apt-get -y dist-upgrade" ;;
ubuntu | debian | devuan) pct exec "$container" -- bash -c "apt-get update 2>/dev/null | grep 'packages.*upgraded'; apt list --upgradable && apt-get -yq dist-upgrade" ;;
esac
}