mirror of https://github.com/tteck/Proxmox.git
Compare commits
9 Commits
95e26b6842
...
04647388bf
Author | SHA1 | Date |
---|---|---|
|
04647388bf | |
|
92b50cf36f | |
|
6463c85f05 | |
|
2bfd58c92c | |
|
ec2b16970f | |
|
c9d255012c | |
|
813771cde4 | |
|
e874e9c5cc | |
|
9af470895c |
|
@ -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.
|
- 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
|
## 2023-11-8
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
|
|
|
@ -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"
|
10
ct/sonarr.sh
10
ct/sonarr.sh
|
@ -53,6 +53,16 @@ function default_settings() {
|
||||||
function update_script() {
|
function update_script() {
|
||||||
header_info
|
header_info
|
||||||
if [[ ! -f /etc/apt/sources.list.d/sonarr.list ]]; 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
|
||||||
|
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"
|
msg_info "Updating $APP LXC"
|
||||||
apt-get update &>/dev/null
|
apt-get update &>/dev/null
|
||||||
apt-get -y upgrade &>/dev/null
|
apt-get -y upgrade &>/dev/null
|
||||||
|
|
|
@ -23,7 +23,7 @@ var_disk="4"
|
||||||
var_cpu="2"
|
var_cpu="2"
|
||||||
var_ram="2048"
|
var_ram="2048"
|
||||||
var_os="debian"
|
var_os="debian"
|
||||||
var_version="11"
|
var_version="12"
|
||||||
variables
|
variables
|
||||||
color
|
color
|
||||||
catch_errors
|
catch_errors
|
||||||
|
|
|
@ -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"
|
|
@ -29,10 +29,10 @@ $STD apt-get update
|
||||||
DEBIAN_FRONTEND=noninteractive apt-get -o Dpkg::Options::="--force-confold" install -qqy sonarr &>/dev/null
|
DEBIAN_FRONTEND=noninteractive apt-get -o Dpkg::Options::="--force-confold" install -qqy sonarr &>/dev/null
|
||||||
if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then
|
if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then
|
||||||
systemctl stop sonarr.service
|
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
|
wget -q -O SonarrV4.tar.gz 'https://services.sonarr.tv/v1/download/develop/latest?version=4&os=linux'
|
||||||
tar -xzf Sonarr.develop.4.0.0.697.linux-x64.tar.gz
|
tar -xzf SonarrV4.tar.gz
|
||||||
cp -r Sonarr/* /usr/lib/sonarr/bin
|
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|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
|
sed -i 's/\(User=\|Group=\).*/\1root/' /lib/systemd/system/sonarr.service
|
||||||
systemctl daemon-reload
|
systemctl daemon-reload
|
||||||
|
|
|
@ -67,7 +67,7 @@ function update_container() {
|
||||||
alpine) pct exec "$container" -- ash -c "apk update && apk upgrade" ;;
|
alpine) pct exec "$container" -- ash -c "apk update && apk upgrade" ;;
|
||||||
archlinux) pct exec "$container" -- bash -c "pacman -Syyu --noconfirm" ;;
|
archlinux) pct exec "$container" -- bash -c "pacman -Syyu --noconfirm" ;;
|
||||||
fedora | rocky | centos | alma) pct exec "$container" -- bash -c "dnf -y update && dnf -y upgrade" ;;
|
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
|
esac
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue