Skip to content

Commit cb14655

Browse files
'Add new script' (#4620)
Co-authored-by: push-app-to-main[bot] <203845782+push-app-to-main[bot]@users.noreply.github.com>
1 parent 796c31e commit cb14655

File tree

4 files changed

+182
-0
lines changed

4 files changed

+182
-0
lines changed

ct/configarr.sh

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
#!/usr/bin/env bash
2+
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
3+
# Copyright (c) 2021-2025 community-scripts ORG
4+
# Author: finkerle
5+
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
6+
# Source: https://github.com/raydak-labs/configarr
7+
8+
APP="Configarr"
9+
var_cpu="${var_cpu:-1}"
10+
var_ram="${var_ram:-512}"
11+
var_disk="${var_disk:-4}"
12+
var_os="${var_os:-debian}"
13+
var_version="${var_version:-12}"
14+
var_unprivileged="${var_unprivileged:-1}"
15+
16+
header_info "$APP"
17+
variables
18+
color
19+
catch_errors
20+
21+
function update_script() {
22+
header_info
23+
check_container_storage
24+
check_container_resources
25+
26+
if [[ ! -d /opt/configarr ]]; then
27+
msg_error "No ${APP} Installation Found!"
28+
exit
29+
fi
30+
RELEASE=$(curl -fsSL https://api.github.com/repos/raydak-labs/configarr/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
31+
if [[ "${RELEASE}" != "$(cat /opt/configarr_version.txt)" ]] || [[ ! -f /opt/configarr_version.txt ]]; then
32+
msg_info "Stopping $APP"
33+
systemctl stop configarr-task.timer
34+
msg_ok "Stopped $APP"
35+
36+
msg_info "Updating $APP to v${RELEASE}"
37+
mkdir -p /opt/backup/
38+
mv /opt/configarr/{config.yml,secrets.yml,.env} "/opt/backup/"
39+
rm -rf /opt/configarr
40+
fetch_and_deploy_gh_release "raydak-labs/configarr"
41+
mv /opt/backup/* /opt/configarr/
42+
cd /opt/configarr
43+
$STD pnpm install
44+
$STD pnpm run build
45+
msg_ok "Updated $APP to v${RELEASE}"
46+
47+
msg_info "Starting $APP"
48+
systemctl start configarr-task.timer
49+
msg_ok "Started configarr"
50+
51+
rm -rf /opt/backup
52+
msg_ok "Update Successful"
53+
else
54+
msg_ok "No update required. ${APP} is already at v${RELEASE}"
55+
fi
56+
exit
57+
}
58+
59+
start
60+
build_container
61+
description
62+
63+
msg_ok "Completed Successfully!\n"
64+
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
65+
echo -e "${INFO}${YW} Access it using the following URL (no web-ui):${CL}"
66+
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:8989${CL}"

ct/headers/configarr

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
______ _____
2+
/ ____/___ ____ / __(_)___ _____ ___________
3+
/ / / __ \/ __ \/ /_/ / __ `/ __ `/ ___/ ___/
4+
/ /___/ /_/ / / / / __/ / /_/ / /_/ / / / /
5+
\____/\____/_/ /_/_/ /_/\__, /\__,_/_/ /_/
6+
/____/
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
{
2+
"name": "Configarr",
3+
"slug": "configarr",
4+
"categories": [
5+
14
6+
],
7+
"date_created": "2025-05-06",
8+
"type": "ct",
9+
"updateable": true,
10+
"privileged": false,
11+
"interface_port": 8989,
12+
"documentation": "https://configarr.raydak.de/docs/intro",
13+
"config_path": "/opt/configarr/config.yml",
14+
"website": "https://configarr.raydak.de/",
15+
"logo": "https://github.com/raydak-labs/configarr/blob/main/docs/static/img/logo.webp",
16+
"description": "Configarr is an open-source tool designed to simplify configuration and synchronization for Sonarr and Radarr (and other experimental). It integrates with TRaSH Guides to automate updates of custom formats, quality profiles, and other settings, while also supporting user-defined configurations.",
17+
"install_methods": [
18+
{
19+
"type": "default",
20+
"script": "ct/configarr.sh",
21+
"resources": {
22+
"cpu": 1,
23+
"ram": 512,
24+
"hdd": 4,
25+
"os": "Debian",
26+
"version": "12"
27+
}
28+
}
29+
],
30+
"default_credentials": {
31+
"username": null,
32+
"password": null
33+
},
34+
"notes": [
35+
{
36+
"text": "change secrets file /opt/configarr/secrets.yml",
37+
"type": "info"
38+
}
39+
]
40+
}

install/configarr-install.sh

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
#!/usr/bin/env bash
2+
3+
# Copyright (c) 2021-2025 community-scripts ORG
4+
# Author: finkerle
5+
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
6+
# Source: https://github.com/raydak-labs/configarr
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+
msg_info "Installing Dependencies"
17+
$STD apt-get install -y \
18+
git
19+
msg_ok "Installed Dependencies"
20+
21+
NODE_MODULE="pnpm@latest" install_node_and_modules
22+
fetch_and_deploy_gh_release "raydak-labs/configarr"
23+
24+
msg_info "Setup ${APPLICATION}"
25+
cat <<EOF >/opt/configarr/.env
26+
ROOT_PATH=/opt/configarr
27+
CUSTOM_REPO_ROOT=/opt/configarr/repos
28+
CONFIG_LOCATION=/opt/configarr/config.yml
29+
SECRETS_LOCATION=/opt/configarr/secrets.yml
30+
EOF
31+
mv /opt/configarr/secrets.yml.template /opt/configarr/secrets.yml
32+
sed 's|#localConfigTemplatesPath: /app/templates|#localConfigTemplatesPath: /opt/configarr/templates|' /opt/configarr/config.yml.template >/opt/configarr/config.yml
33+
cd /opt/configarr
34+
$STD pnpm install
35+
$STD pnpm run build
36+
msg_ok "Setup ${APPLICATION}"
37+
38+
msg_info "Creating Service"
39+
cat <<EOF >/etc/systemd/system/configarr-task.service
40+
[Unit]
41+
Description=Run Configarr Task
42+
43+
[Service]
44+
Type=oneshot
45+
WorkingDirectory=/opt/configarr
46+
ExecStart=/usr/bin/node /opt/configarr/bundle.cjs
47+
EOF
48+
49+
cat <<EOF >/etc/systemd/system/configarr-task.timer
50+
[Unit]
51+
Description=Run Configarr every 5 minutes
52+
53+
[Timer]
54+
OnBootSec=2min
55+
OnUnitActiveSec=5min
56+
Persistent=true
57+
58+
[Install]
59+
WantedBy=timers.target
60+
EOF
61+
systemctl enable -q --now configarr-task.timer configarr-task.service
62+
msg_ok "Created Service"
63+
64+
motd_ssh
65+
customize
66+
67+
msg_info "Cleaning up"
68+
$STD apt-get -y autoremove
69+
$STD apt-get -y autoclean
70+
msg_ok "Cleaned"

0 commit comments

Comments
 (0)