Files
ProxmoxVE/install/dolibarr-install.sh
T

48 lines
1.5 KiB
Bash
Raw Normal View History

2025-02-20 09:51:32 +01:00
#!/usr/bin/env bash
# Copyright (c) 2021-2026 community-scripts ORG
2025-02-20 09:51:32 +01:00
# Author: Slaviša Arežina (tremor021)
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
# Source: https://github.com/Dolibarr/dolibarr/
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
2025-02-20 09:51:32 +01:00
color
verb_ip6
catch_errors
setting_up_container
network_check
update_os
msg_info "Installing Dependencies"
$STD apt install -y \
2025-02-20 09:51:32 +01:00
php-imap \
debconf-utils
2025-02-20 09:51:32 +01:00
msg_ok "Installed Dependencies"
setup_mariadb
2025-02-20 09:51:32 +01:00
msg_info "Setting up Database"
2026-10-03 08:19:10 +02:00
ROOT_PASS=$(random_password 13)
2025-06-10 19:36:48 +02:00
$STD mariadb -u root -e "ALTER USER 'root'@'localhost' IDENTIFIED BY '$ROOT_PASS'; flush privileges;"
cat <<EOF >~/dolibarr.creds
Dolibarr DB Credentials
MariaDB Root Password: $ROOT_PASS
EOF
2025-02-20 09:51:32 +01:00
msg_ok "Set up database"
msg_info "Setup Dolibarr"
BASE="https://sourceforge.net/projects/dolibarr/files/Dolibarr%20installer%20for%20Debian-Ubuntu%20(DoliDeb)/"
2025-06-14 11:46:59 +01:00
RELEASE=$(curl -fsSL "$BASE" | grep -oP '(?<=/Dolibarr%20installer%20for%20Debian-Ubuntu%20%28DoliDeb%29/)\d+(\.\d+)+(?=/)' | sort -V | tail -n1)
FILE=$(curl -fsSL "${BASE}${RELEASE}/" | grep -oP 'dolibarr_[^"]+_all.deb' | head -n1)
2026-01-20 22:21:02 +01:00
curl -fsSL "https://altushost-swe.dl.sourceforge.net/project/dolibarr/Dolibarr%20installer%20for%20Debian-Ubuntu%20(DoliDeb)/${RELEASE}/${FILE}?viasf=1" -o ""$FILE""
2025-02-20 09:51:32 +01:00
echo "dolibarr dolibarr/reconfigure-webserver multiselect apache2" | debconf-set-selections
$STD apt install ./$FILE -y
2025-02-20 09:51:32 +01:00
$STD apt install -f
rm -rf ~/$FILE
2025-02-20 09:51:32 +01:00
echo "${RELEASE}" >"/opt/${APPLICATION}_version.txt"
msg_ok "Setup Dolibarr"
motd_ssh
customize
cleanup_lxc