Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

New Script: Radicale #1941

Merged
merged 11 commits into from
Feb 5, 2025
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 46 additions & 0 deletions ct/radicale.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
#!/usr/bin/env bash
source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
# Copyright (c) 2021-2025 tteck
tremor021 marked this conversation as resolved.
Show resolved Hide resolved
# Author: tremor021
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
# Source: https://radicale.org/

# App Default Values
APP="Radicale"
var_tags="calendar"
var_cpu="1"
var_ram="512"
var_disk="2"
var_os="debian"
var_version="12"
var_unprivileged="1"

# App Output & Base Settings
header_info "$APP"
base_settings

# Core
variables
color
catch_errors

function update_script() {
header_info
check_container_storage
check_container_resources
if [[ ! -d /opt/snipeit ]]; then
tremor021 marked this conversation as resolved.
Show resolved Hide resolved
msg_error "No ${APP} Installation Found!"
exit
fi
msg_error "Ther is currently no automatic update function for ${APP}."
tremor021 marked this conversation as resolved.
Show resolved Hide resolved
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}:5232${CL}"
64 changes: 64 additions & 0 deletions install/radicale-install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
#!/usr/bin/env bash

#Copyright (c) 2021-2025 community-scripts ORG
# Author: Michel Roegl-Brunner (michelroegl-brunner)
tremor021 marked this conversation as resolved.
Show resolved Hide resolved
# License: MIT
# https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
tremor021 marked this conversation as resolved.
Show resolved Hide resolved

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 apache2-utils python3-pip python3.11-venv
tremor021 marked this conversation as resolved.
Show resolved Hide resolved
msg_ok "Installed Dependencies"

msg_info "Setting up Radicale"
sleep 2
tremor021 marked this conversation as resolved.
Show resolved Hide resolved
python3 -m venv /opt/radicale
source /opt/radicale/bin/activate
python3 -m pip install --upgrade https://github.com/Kozea/Radicale/archive/master.tar.gz
msg_ok "Setup Radicale"
msg_ok "Setting up admin user password:"
tremor021 marked this conversation as resolved.
Show resolved Hide resolved
sleep 2
tremor021 marked this conversation as resolved.
Show resolved Hide resolved
htpasswd -c -5 /opt/radicale/users admin
tremor021 marked this conversation as resolved.
Show resolved Hide resolved

tremor021 marked this conversation as resolved.
Show resolved Hide resolved
msg_info "Setup Service"

cat <<EOF >/opt/radicale/start.sh
#!/usr/bin/env bash
source /opt/radicale/bin/activate
python3 -m radicale --storage-filesystem-folder=/var/lib/radicale/collections --hosts 0.0.0.0:5232 --auth-type htpasswd --auth-htpasswd-filename /opt/radicale/users --auth-htpasswd-encryption sha512
EOF

chmod +x /opt/radicale/start.sh

cat <<EOF >/etc/systemd/system/radicale.service
Description=A simple CalDAV (calendar) and CardDAV (contact) server
After=network.target
Requires=network.target

[Service]
ExecStart=/opt/radicale/start.sh
Restart=on-failure
# User=radicale
# Deny other users access to the calendar data
# UMask=0027

[Install]
WantedBy=multi-user.target
EOF
msg_ok "Created Service"
systemctl start radicale
tremor021 marked this conversation as resolved.
Show resolved Hide resolved

motd_ssh
customize

msg_info "Cleaning up"
$STD apt-get -y autoremove
$STD apt-get -y autoclean
msg_ok "Cleaned"
34 changes: 34 additions & 0 deletions json/radicale.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"name": "Radicale",
"slug": "radicale",
"categories": [
6
],
"date_created": "2025-02-02",
"type": "ct",
"updateable": false,
"privileged": false,
"interface_port": 5232,
"documentation": "https://radicale.org/master.html#documentation-1",
"website": "https://radicale.org/",
"logo": "https://radicale.org/assets/logo.svg",
"description": "Radicale is a small but powerful CalDAV (calendars, to-do lists) and CardDAV (contacts)",
"install_methods": [
{
"type": "default",
"script": "ct/radicale.sh",
"resources": {
"cpu": 1,
"ram": 512,
"hdd": 2,
"os": "Debian",
"version": "12"
}
}
],
"default_credentials": {
"username": "admin",
"password": "created at setup"
tremor021 marked this conversation as resolved.
Show resolved Hide resolved
},
"notes": []
}