forked from bluecherrydvr/bluecherry-apps
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpostinstall.sh
More file actions
25 lines (21 loc) · 1.05 KB
/
Copy pathpostinstall.sh
File metadata and controls
25 lines (21 loc) · 1.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# Ensure PHP-FPM timezone matches system timezone
bash scripts/fix_php_timezone.sh
function install_certbot
{
source /etc/os-release
# Handle known modern distros where apt is preferred but we can't run it inside dpkg
if [[ ("$ID" == "ubuntu" && "$VERSION_CODENAME" == "noble") || \
("$ID" == "linuxmint" && "$VERSION_ID" == "22.1" && "$VERSION_CODENAME" == "xia") ]]; then
echo 'Detected Ubuntu 24.04 or Linux Mint 22.1 (Noble/Xia-based) or newer'
echo 'Skipping pip-based certbot install to preserve system integrity.'
echo 'Please manually run the following after install completes:'
echo ' sudo apt install certbot python3-certbot-nginx python3-certbot-dns-cloudflare'
return
fi
# For older distros, fallback to pip method
install_pip || return 0
pip3 install --user --upgrade setuptools_rust certbot certbot-dns-subdomain-provider || true
pip3 install --user --upgrade pip || true
pip3 install --user --upgrade cryptography || true
pip3 install pyopenssl --upgrade || true
}