Compare commits

...

25 Commits

Author SHA1 Message Date
connorjfarrell
bdafc76ff9
Merge b6b5748e9a into 84b982ffa8 2025-01-27 22:35:52 +01:00
connorjfarrell
b6b5748e9a
Merge branch 'community-scripts:main' into connorjfarrell/zoneminder 2025-01-27 10:26:22 -06:00
connorjfarrell
31ef2e8592
add license url 2025-01-27 10:26:04 -06:00
connorjfarrell
64861d0221
Update install/zoneminder-install.sh
Co-authored-by: Michel Roegl-Brunner <73236783+michelroegl-brunner@users.noreply.github.com>
2025-01-27 10:24:13 -06:00
connorjfarrell
364ead3b56
Update ct/zoneminder.sh
Co-authored-by: Michel Roegl-Brunner <73236783+michelroegl-brunner@users.noreply.github.com>
2025-01-27 10:23:53 -06:00
connorjfarrell
4e0af7f49b
Merge branch 'community-scripts:main' into connorjfarrell/zoneminder 2025-01-24 10:29:46 -06:00
connorjfarrell
2ff64bdc37
remove comments 2025-01-24 10:27:54 -06:00
connorjfarrell
17b23ba04b
clean up update function 2025-01-24 10:26:18 -06:00
connorjfarrell
691c9209dd
remove comments 2025-01-24 10:24:38 -06:00
connorjfarrell
b74d275b3e
Update zoneminder-install.sh
update header metadata
2025-01-23 20:39:22 -06:00
connorjfarrell
e8e0f10cf7
Update zoneminder.sh
Update header metadata
2025-01-23 20:38:55 -06:00
connorjfarrell
b105a16562
Merge branch 'community-scripts:main' into connorjfarrell/zoneminder 2025-01-23 20:37:55 -06:00
Connor J. Farrell
ff72a6af26 Revert "modified: misc/build.func"
This reverts commit 215b605099.
2025-01-21 22:58:03 -06:00
connorjfarrell
3a28e39cd3
Update zoneminder.sh
Change build.func ref back to public repo
2025-01-21 22:51:34 -06:00
connorjfarrell
3b4b895361
Update zoneminder-install.sh
Fix mysql crash
2025-01-21 22:01:29 -06:00
connorjfarrell
445baab1ef
Update zoneminder.sh
Remove extra bit from before reading instructions
2025-01-21 21:38:00 -06:00
connorjfarrell
2fd156686e
Update zoneminder.sh
Change build.func ref.... rtfm!
2025-01-21 21:36:05 -06:00
connorjfarrell
b7a99e6bae
Update zoneminder.sh
Fix tags
2025-01-21 21:28:26 -06:00
connorjfarrell
7691253739
Update zoneminder.json
Update categories
2025-01-21 21:25:29 -06:00
connorjfarrell
0b6fe6e5e3
Update zoneminder.sh
actually call the function
2025-01-21 21:22:52 -06:00
Connor J. Farrell
90d8ee2a38 Need to actually run zoneminder-install.sh 2025-01-21 21:19:15 -06:00
Connor J. Farrell
215b605099 modified: misc/build.func 2025-01-21 21:08:10 -06:00
Connor J. Farrell
d5c28b632b Create zoneminder-install.sh 2025-01-21 21:07:33 -06:00
Connor J. Farrell
5023b8468d create zoneminder.sh 2025-01-21 20:57:56 -06:00
Connor J. Farrell
0da98be2ef Create json file 2025-01-21 20:53:39 -06:00
3 changed files with 161 additions and 0 deletions

60
ct/zoneminder.sh Normal file
View File

@ -0,0 +1,60 @@
#!/usr/bin/env bash
source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
# Copyright (c) 2021-2024 community-scripts ORG
# Author: connorjfarrell
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
# Source: https://zoneminder.readthedocs.io
APP="ZoneMinder"
var_tags="nvr"
var_cpu="2"
var_ram="2048"
var_disk="16"
var_os="ubuntu"
var_version="22.04"
var_unprivileged="1"
header_info "$APP"
base_settings
variables
color
catch_errors
function update_script() {
header_info
check_container_storage
check_container_resources
if [[ ! -f /usr/bin/zmpkg.pl ]]; then
msg_error "No ${APP} Installation Found!"
exit
fi
RELEASE=$(curl -fsSL https://api.github.com/repos/ZoneMinder/zoneminder/releases/latest | grep -Po '"tag_name": "\K.*?(?=")')
if [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt 2>/dev/null || echo 'none')" ]] || [[ ! -f /opt/${APP}_version.txt ]]; then
msg_info "Updating to v${RELEASE}"
systemctl stop zoneminder
apt-get update && apt-get install --only-upgrade zoneminder -y
systemctl start zoneminder
sleep 2
echo "${RELEASE}" >/opt/${APP}_version.txt
msg_ok "Update Successful"
else
msg_ok "${APP} is already v${RELEASE}"
fi
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}:80/zm${CL}"

View File

@ -0,0 +1,67 @@
#!/usr/bin/env bash
# Copyright (c) 2021-2024 community-scripts ORG
# Author: connorjfarrell
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
# Source: https://zoneminder.readthedocs.io
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 \
sudo \
mc \
apache2 \
mariadb-server \
libapache2-mod-php
msg_ok "Installed Dependencies"
msg_info "Pre-seeding dbconfig-common for ZoneMinder"
ROOT_PASS=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | head -c13)
ZMPASS=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | head -c13)
export DEBIAN_FRONTEND=noninteractive
echo "zoneminder zoneminder/dbconfig-install boolean true" | debconf-set-selections
echo "zoneminder zoneminder/dbconfig-reinstall boolean false" | debconf-set-selections
echo "zoneminder zoneminder/mysql/admin-user string root" | debconf-set-selections
echo "zoneminder zoneminder/mysql/admin-pass password $ROOT_PASS" | debconf-set-selections
echo "zoneminder zoneminder/mysql/app-pass password $ZMPASS" | debconf-set-selections
echo "zoneminder zoneminder/app-password-confirm password $ZMPASS"| debconf-set-selections
{
echo "ZoneMinder Database Credentials"
echo "MySQL Root Password: $ROOT_PASS"
echo "ZoneMinder DB User: zmuser"
echo "ZoneMinder DB Pass: $ZMPASS"
echo "ZoneMinder DB Name: zm"
} >> ~/zoneminder.creds
msg_ok "dbconfig pre-seeding complete"
msg_info "Enabling ZoneMinder PPA and installing ZoneMinder"
$STD apt install -y software-properties-common
$STD add-apt-repository ppa:iconnor/zoneminder-1.36 -y
$STD apt update
$STD apt-get install -y zoneminder
msg_ok "ZoneMinder installed"
msg_info "Configuring Apache and ZoneMinder"
a2enmod rewrite
a2enconf zoneminder
systemctl restart apache2
systemctl enable zoneminder
systemctl start zoneminder
msg_ok "Apache and ZoneMinder configured and running"
msg_info "Cleaning up"
$STD apt-get -y autoremove
$STD apt-get -y autoclean
msg_ok "Cleaned"

34
json/zoneminder.json Normal file
View File

@ -0,0 +1,34 @@
{
"name": "ZoneMinder",
"slug": "zoneminder",
"categories": [
15
],
"date_created": "2025-01-21",
"type": "ct",
"updateable": true,
"privileged": false,
"interface_port": 80,
"documentation": null,
"website": "https://zoneminder.com",
"logo": "https://raw.githubusercontent.com/ZoneMinder/ZoneMinder/master/web/graphics/icon_zoneminder.png",
"description": "ZoneMinder is an open source video surveillance solution for Linux.",
"install_methods": [
{
"type": "default",
"script": "ct/ZoneMinder.sh",
"resources": {
"cpu": 2,
"ram": 2048,
"hdd": 16,
"os": "ubuntu",
"version": "22.04"
}
}
],
"default_credentials": {
"username": null,
"password": null
},
"notes": []
}