mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2025-04-16 15:51:55 +00:00

* Initial Call, Switch from curl -s to curl -fsSL and wget to curl -fssL * more switches * switch vms * more curls * More curls * more * more * more changes * more * prepare ipv6 calls * change frontend to ipv6 * Formatting * Fromatting * Update gomft.sh * Update gomft-install.sh * Update ersatztv.sh * Update build.func --------- Co-authored-by: Slaviša Arežina <58952836+tremor021@users.noreply.github.com>
51 lines
1.7 KiB
Bash
51 lines
1.7 KiB
Bash
#!/usr/bin/env bash
|
|
|
|
# Copyright (c) 2021-2025 community-scripts ORG
|
|
# 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"
|
|
color
|
|
verb_ip6
|
|
catch_errors
|
|
setting_up_container
|
|
network_check
|
|
update_os
|
|
|
|
msg_info "Installing Dependencies"
|
|
$STD apt-get install -y \
|
|
php-imap \
|
|
debconf-utils \
|
|
mariadb-server
|
|
msg_ok "Installed Dependencies"
|
|
|
|
msg_info "Setting up Database"
|
|
ROOT_PASS=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | head -c13)
|
|
$STD sudo mysql -u root -e "ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password AS PASSWORD('$ROOT_PASS'); flush privileges;"
|
|
{
|
|
echo "Dolibarr DB Credentials"
|
|
echo "MariaDB Root Password: $ROOT_PASS"
|
|
} >>~/dolibarr.creds
|
|
msg_ok "Set up database"
|
|
|
|
msg_info "Setup Dolibarr"
|
|
BASE="https://sourceforge.net/projects/dolibarr/files/Dolibarr%20installer%20for%20Debian-Ubuntu%20(DoliDeb)/"
|
|
RELEASE=$(curl -fsSL "$BASE" | grep -oP '(?<=/Dolibarr%20installer%20for%20Debian-Ubuntu%20%28DoliDeb%29/)[^/"]+' | head -n1)
|
|
FILE=$(curl -fsSL "${BASE}${RELEASE}/" | grep -oP 'dolibarr_[^"]+_all.deb' | head -n1)
|
|
curl -fsSL "https://netcologne.dl.sourceforge.net/project/dolibarr/Dolibarr%20installer%20for%20Debian-Ubuntu%20(DoliDeb)/${RELEASE}/${FILE}?viasf=1" -o ""$FILE""
|
|
echo "dolibarr dolibarr/reconfigure-webserver multiselect apache2" | debconf-set-selections
|
|
$STD apt-get install ./$FILE -y
|
|
$STD apt install -f
|
|
echo "${RELEASE}" >"/opt/${APPLICATION}_version.txt"
|
|
msg_ok "Setup Dolibarr"
|
|
|
|
motd_ssh
|
|
customize
|
|
|
|
msg_info "Cleaning up"
|
|
rm -rf ~/$FILE
|
|
$STD apt-get autoremove
|
|
$STD apt-get autoclean
|
|
msg_ok "Cleaned"
|