Skip to content

Commit 562761a

Browse files
push-app-to-main[bot]Learath
authored andcommitted
Add dynacat (ct) (community-scripts#14777)
Co-authored-by: push-app-to-main[bot] <203845782+push-app-to-main[bot]@users.noreply.github.com>
1 parent 08da2e0 commit 562761a

3 files changed

Lines changed: 146 additions & 0 deletions

File tree

ct/dynacat.sh

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
#!/usr/bin/env bash
2+
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
3+
# Copyright (c) 2021-2026 community-scripts ORG
4+
# Author: MickLesk (CanbiZ)
5+
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
6+
# Source: https://github.com/Panonim/dynacat
7+
8+
APP="Dynacat"
9+
var_tags="${var_tags:-dashboard;homepage;monitoring}"
10+
var_cpu="${var_cpu:-2}"
11+
var_ram="${var_ram:-2048}"
12+
var_disk="${var_disk:-6}"
13+
var_os="${var_os:-debian}"
14+
var_version="${var_version:-13}"
15+
var_arm64="${var_arm64:-no}"
16+
var_unprivileged="${var_unprivileged:-1}"
17+
18+
header_info "$APP"
19+
variables
20+
color
21+
catch_errors
22+
23+
function update_script() {
24+
header_info
25+
check_container_storage
26+
check_container_resources
27+
28+
if [[ ! -f /opt/dynacat/dynacat ]]; then
29+
msg_error "No ${APP} Installation Found!"
30+
exit
31+
fi
32+
33+
if check_for_gh_release "dynacat" "Panonim/dynacat"; then
34+
msg_info "Stopping Service"
35+
systemctl stop dynacat
36+
msg_ok "Stopped Service"
37+
38+
msg_info "Backing up Data"
39+
cp -r /opt/dynacat/config /opt/dynacat_config_backup
40+
cp -r /opt/dynacat/assets /opt/dynacat_assets_backup
41+
cp -r /opt/dynacat/data /opt/dynacat_data_backup
42+
msg_ok "Backed up Data"
43+
44+
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "dynacat" "Panonim/dynacat" "prebuild" "latest" "/opt/dynacat" "dynacat-linux-amd64.tar.gz"
45+
46+
msg_info "Restoring Data"
47+
cp -r /opt/dynacat_config_backup/. /opt/dynacat/config
48+
cp -r /opt/dynacat_assets_backup/. /opt/dynacat/assets
49+
cp -r /opt/dynacat_data_backup/. /opt/dynacat/data
50+
rm -rf /opt/dynacat_config_backup /opt/dynacat_assets_backup /opt/dynacat_data_backup
51+
chmod +x /opt/dynacat/dynacat
52+
msg_ok "Restored Data"
53+
54+
msg_info "Starting Service"
55+
systemctl start dynacat
56+
msg_ok "Started Service"
57+
msg_ok "Updated successfully!"
58+
fi
59+
exit
60+
}
61+
62+
start
63+
build_container
64+
description
65+
66+
msg_ok "Completed Successfully!\n"
67+
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
68+
echo -e "${INFO}${YW} Access it using the following URL:${CL}"
69+
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:8080${CL}"

ct/headers/dynacat

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
____ __
2+
/ __ \__ ______ ____ __________ _/ /_
3+
/ / / / / / / __ \/ __ `/ ___/ __ `/ __/
4+
/ /_/ / /_/ / / / / /_/ / /__/ /_/ / /_
5+
/_____/\__, /_/ /_/\__,_/\___/\__,_/\__/
6+
/____/

install/dynacat-install.sh

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
#!/usr/bin/env bash
2+
3+
# Copyright (c) 2021-2026 community-scripts ORG
4+
# Author: MickLesk (CanbiZ)
5+
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
6+
# Source: https://github.com/Panonim/dynacat
7+
8+
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
9+
color
10+
verb_ip6
11+
catch_errors
12+
setting_up_container
13+
network_check
14+
update_os
15+
16+
fetch_and_deploy_gh_release "dynacat" "Panonim/dynacat" "prebuild" "latest" "/opt/dynacat" "dynacat-linux-amd64.tar.gz"
17+
18+
msg_info "Setting up Dynacat"
19+
mkdir -p /opt/dynacat/config /opt/dynacat/assets /opt/dynacat/data
20+
chmod +x /opt/dynacat/dynacat
21+
22+
cat <<EOF >/opt/dynacat/config/dynacat.yml
23+
server:
24+
host: 0.0.0.0
25+
port: 8080
26+
assets-path: /opt/dynacat/assets
27+
db-path: /opt/dynacat/data/dynacat.db
28+
29+
pages:
30+
- name: Home
31+
columns:
32+
- size: small
33+
widgets:
34+
- type: calendar
35+
- type: clock
36+
- size: full
37+
widgets:
38+
- type: search
39+
search-engine: duckduckgo
40+
- type: monitor
41+
title: Services
42+
sites:
43+
- title: Dynacat
44+
url: http://127.0.0.1:8080
45+
update-interval: 5m
46+
EOF
47+
msg_ok "Set up Dynacat"
48+
49+
msg_info "Creating Service"
50+
cat <<EOF >/etc/systemd/system/dynacat.service
51+
[Unit]
52+
Description=Dynacat Dashboard
53+
After=network.target
54+
55+
[Service]
56+
Type=simple
57+
User=root
58+
WorkingDirectory=/opt/dynacat
59+
ExecStart=/opt/dynacat/dynacat -config /opt/dynacat/config/dynacat.yml
60+
Restart=on-failure
61+
RestartSec=5
62+
63+
[Install]
64+
WantedBy=multi-user.target
65+
EOF
66+
systemctl enable -q --now dynacat
67+
msg_ok "Created Service"
68+
69+
motd_ssh
70+
customize
71+
cleanup_lxc

0 commit comments

Comments
 (0)