remove viseron
This commit is contained in:
parent
30b2211501
commit
5fc334811c
@ -1,38 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
source <(curl -fsSL https://git.community-scripts.org/community-scripts/ProxmoxVED/raw/branch/main/misc/build.func)
|
|
||||||
|
|
||||||
APP="Viseron"
|
|
||||||
var_tags="${var_tags:-nvr}"
|
|
||||||
var_cpu="${var_cpu:-2}"
|
|
||||||
var_ram="${var_ram:-2048}"
|
|
||||||
var_disk="${var_disk:-25}"
|
|
||||||
var_os="${var_os:-debian}"
|
|
||||||
var_version="${var_version:-13}"
|
|
||||||
var_unprivileged="${var_unprivileged:-0}"
|
|
||||||
|
|
||||||
header_info "$APP"
|
|
||||||
|
|
||||||
variables
|
|
||||||
color
|
|
||||||
catch_errors
|
|
||||||
|
|
||||||
function update_script() {
|
|
||||||
header_info
|
|
||||||
check_container_storage
|
|
||||||
check_container_resources
|
|
||||||
if [[ ! -f /etc/systemd/system/viseron.service ]]; then
|
|
||||||
msg_error "No ${APP} Installation Found!"
|
|
||||||
exit
|
|
||||||
fi
|
|
||||||
msg_error "To update Viseron, create a new container and transfer your configuration."
|
|
||||||
exit
|
|
||||||
}
|
|
||||||
|
|
||||||
start
|
|
||||||
build_container
|
|
||||||
description
|
|
||||||
|
|
||||||
msg_ok "Completed Successfully!\n"
|
|
||||||
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
|
|
||||||
echo -e "${INFO}${YW} Access it using the following URL:${CL}"
|
|
||||||
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:8888${CL}"
|
|
||||||
@ -1,48 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "Viseron",
|
|
||||||
"slug": "viseron",
|
|
||||||
"categories": [
|
|
||||||
15
|
|
||||||
],
|
|
||||||
"date_created": "2025-01-15",
|
|
||||||
"type": "ct",
|
|
||||||
"updateable": true,
|
|
||||||
"privileged": false,
|
|
||||||
"config_path": "/config/viseron.yaml",
|
|
||||||
"interface_port": 8888,
|
|
||||||
"documentation": "https://github.com/roflcoopter/viseron",
|
|
||||||
"website": "https://github.com/roflcoopter/viseron",
|
|
||||||
"logo": "https://cdn.jsdelivr.net/gh/selfhst/icons/svg/viseron.svg",
|
|
||||||
"description": "Viseron is an open-source NVR (Network Video Recorder) with object detection capabilities. It can detect objects in video streams and record events when motion is detected.",
|
|
||||||
"install_methods": [
|
|
||||||
{
|
|
||||||
"type": "default",
|
|
||||||
"script": "ct/viseron.sh",
|
|
||||||
"resources": {
|
|
||||||
"cpu": 2,
|
|
||||||
"ram": 2048,
|
|
||||||
"hdd": 10,
|
|
||||||
"os": "Debian",
|
|
||||||
"version": "12"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"default_credentials": {
|
|
||||||
"username": null,
|
|
||||||
"password": null
|
|
||||||
},
|
|
||||||
"notes": [
|
|
||||||
{
|
|
||||||
"text": "Configuration file: /config/viseron.yaml",
|
|
||||||
"type": "info"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"text": "Logs: /config/logs/viseron.log",
|
|
||||||
"type": "info"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"text": "Recordings: /config/recordings",
|
|
||||||
"type": "info"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
@ -1,152 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
# Copyright (c) 2021-2025 community-scripts ORG
|
|
||||||
# Author: jetonr
|
|
||||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
|
||||||
# Source: https://github.com/roflcoopter/viseron
|
|
||||||
|
|
||||||
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 \
|
|
||||||
python3 python3-pip python3-venv \
|
|
||||||
libgl1 libglib2.0-0 \
|
|
||||||
libsm6 libxext6 libxrender-dev \
|
|
||||||
libgstreamer1.0-0 libgstreamer-plugins-base1.0-0 \
|
|
||||||
libgstreamer-plugins-bad1.0-0 gstreamer1.0-plugins-base \
|
|
||||||
gstreamer1.0-plugins-good gstreamer1.0-plugins-bad \
|
|
||||||
gstreamer1.0-plugins-ugly gstreamer1.0-libav \
|
|
||||||
gstreamer1.0-tools gstreamer1.0-x gstreamer1.0-alsa \
|
|
||||||
gstreamer1.0-gl gstreamer1.0-gtk3 gstreamer1.0-qt5 \
|
|
||||||
gstreamer1.0-pulseaudio \
|
|
||||||
libavcodec-dev libavformat-dev libswscale-dev \
|
|
||||||
libv4l-dev libxvidcore-dev libx264-dev \
|
|
||||||
libjpeg-dev libpng-dev libtiff-dev \
|
|
||||||
gfortran \
|
|
||||||
libhdf5-dev \
|
|
||||||
python3-pyqt5 \
|
|
||||||
libgtk-3-dev libcanberra-gtk3-module \
|
|
||||||
libgirepository1.0-dev libcairo2-dev pkg-config \
|
|
||||||
libopenblas-dev liblapack-dev \
|
|
||||||
libxss1 \
|
|
||||||
libasound2 \
|
|
||||||
libpq-dev \
|
|
||||||
cmake build-essential
|
|
||||||
msg_ok "Installed Dependencies"
|
|
||||||
|
|
||||||
mkdir -p ~/.config/pip
|
|
||||||
cat >~/.config/pip/pip.conf <<EOF
|
|
||||||
[global]
|
|
||||||
break-system-packages = true
|
|
||||||
EOF
|
|
||||||
msg_ok "Installed Dependencies"
|
|
||||||
|
|
||||||
msg_info "Setting up Python Environment"
|
|
||||||
python3 -m venv /opt/viseron-venv
|
|
||||||
source /opt/viseron-venv/bin/activate
|
|
||||||
pip install --upgrade pip setuptools wheel
|
|
||||||
msg_ok "Python Environment Setup"
|
|
||||||
|
|
||||||
msg_info "Installing Viseron"
|
|
||||||
RELEASE=$(curl -fsSL https://api.github.com/repos/roflcoopter/viseron/releases/latest | jq -r '.tag_name')
|
|
||||||
curl -fsSL "https://github.com/roflcoopter/viseron/archive/refs/tags/${RELEASE}.tar.gz" -o /tmp/viseron.tar.gz
|
|
||||||
mkdir -p /opt/viseron
|
|
||||||
tar -xzf /tmp/viseron.tar.gz --strip-components=1 -C /opt/viseron
|
|
||||||
rm /tmp/viseron.tar.gz
|
|
||||||
cd /opt/viseron
|
|
||||||
source /opt/viseron-venv/bin/activate
|
|
||||||
pip install -r requirements.txt
|
|
||||||
pip install .
|
|
||||||
msg_ok "Installed Viseron $RELEASE"
|
|
||||||
|
|
||||||
msg_info "Creating Configuration Directory"
|
|
||||||
mkdir -p /config
|
|
||||||
mkdir -p /config/recordings
|
|
||||||
mkdir -p /config/logs
|
|
||||||
msg_ok "Created Configuration Directory"
|
|
||||||
|
|
||||||
msg_info "Creating Default Configuration"
|
|
||||||
cat <<EOF >/config/viseron.yaml
|
|
||||||
# Viseron Configuration
|
|
||||||
# https://github.com/roflcoopter/viseron
|
|
||||||
|
|
||||||
# Logging
|
|
||||||
logging:
|
|
||||||
level: INFO
|
|
||||||
file: /config/logs/viseron.log
|
|
||||||
|
|
||||||
# Web Interface
|
|
||||||
web:
|
|
||||||
host: 0.0.0.0
|
|
||||||
port: 8888
|
|
||||||
|
|
||||||
# Cameras
|
|
||||||
cameras:
|
|
||||||
# Example camera configuration
|
|
||||||
# camera_name:
|
|
||||||
# host: 192.168.1.100
|
|
||||||
# port: 554
|
|
||||||
# username: admin
|
|
||||||
# password: password
|
|
||||||
# path: /stream
|
|
||||||
# fps: 5
|
|
||||||
# width: 1920
|
|
||||||
# height: 1080
|
|
||||||
|
|
||||||
# Object Detection
|
|
||||||
object_detection:
|
|
||||||
type: opencv
|
|
||||||
confidence: 0.5
|
|
||||||
labels:
|
|
||||||
- person
|
|
||||||
- car
|
|
||||||
- truck
|
|
||||||
- bus
|
|
||||||
- motorcycle
|
|
||||||
- bicycle
|
|
||||||
|
|
||||||
# Recording
|
|
||||||
recording:
|
|
||||||
enabled: true
|
|
||||||
path: /config/recordings
|
|
||||||
max_size: 10GB
|
|
||||||
max_age: 7d
|
|
||||||
|
|
||||||
# Motion Detection
|
|
||||||
motion_detection:
|
|
||||||
enabled: true
|
|
||||||
threshold: 25
|
|
||||||
sensitivity: 0.8
|
|
||||||
EOF
|
|
||||||
msg_ok "Created Default Configuration"
|
|
||||||
|
|
||||||
msg_info "Creating Systemd Service"
|
|
||||||
cat <<EOF >/etc/systemd/system/viseron.service
|
|
||||||
[Unit]
|
|
||||||
Description=Viseron NVR Service
|
|
||||||
After=network.target
|
|
||||||
|
|
||||||
[Service]
|
|
||||||
Type=simple
|
|
||||||
User=root
|
|
||||||
WorkingDirectory=/opt/viseron
|
|
||||||
Environment=PATH=/opt/viseron-venv/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
|
|
||||||
ExecStart=/opt/viseron-venv/bin/python -m viseron --config /config/viseron.yaml
|
|
||||||
Restart=always
|
|
||||||
RestartSec=10
|
|
||||||
|
|
||||||
[Install]
|
|
||||||
WantedBy=multi-user.target
|
|
||||||
EOF
|
|
||||||
systemctl enable -q --now viseron
|
|
||||||
msg_ok "Created Systemd Service"
|
|
||||||
|
|
||||||
motd_ssh
|
|
||||||
customize
|
|
||||||
cleanup_lxc
|
|
||||||
Loading…
x
Reference in New Issue
Block a user