From a827025d1ef87d5a530a60fdfe095a12e856087b Mon Sep 17 00:00:00 2001 From: MintHCM-admin Date: Wed, 17 Dec 2025 10:38:53 +0100 Subject: [PATCH 01/27] added ct minthcm --- ct/minthcm.sh | 44 +++++++ frontend/public/json/minthcm.json | 35 ++++++ install/minthcm-install.sh | 190 ++++++++++++++++++++++++++++++ 3 files changed, 269 insertions(+) create mode 100644 ct/minthcm.sh create mode 100644 frontend/public/json/minthcm.json create mode 100644 install/minthcm-install.sh diff --git a/ct/minthcm.sh b/ct/minthcm.sh new file mode 100644 index 000000000..522b97086 --- /dev/null +++ b/ct/minthcm.sh @@ -0,0 +1,44 @@ +#!/usr/bin/env bash +source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func) +# Copyright (c) 2021-2025 minthcm +# Author: MintHCM +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE +# Source: https://github.com/minthcm/minthcm + +APP="MintHCM" +var_tags="${var_tags:-hcm}" +var_disk="${var_disk:-20}" +var_cpu="${var_cpu:-4}" +var_ram="${var_ram:-4096}" +var_os="${var_os:-debian}" +var_version="${var_version:-13}" +var_unprivileged="${var_unprivileged:-1}" + +header_info "$APP" +variables +color +catch_errors + +function update_script() { + header_info "$APP" + check_container_storage + check_container_resources + + INSTALL_DIR="/var/www/MintHCM" + + if [[ ! -d "${INSTALL_DIR}" ]] || [[ ! -d "${INSTALL_DIR}/.git" ]]; then + msg_error "No ${APP} installation found in ${INSTALL_DIR}!" + exit + fi + msg_error "Currently we don't provide an update function for this ${APP}." + 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 (after DB & installer are completed):${CL}" +echo -e "${TAB}${GATEWAY}${BGN}http://${IP}${CL}" diff --git a/frontend/public/json/minthcm.json b/frontend/public/json/minthcm.json new file mode 100644 index 000000000..226f802cb --- /dev/null +++ b/frontend/public/json/minthcm.json @@ -0,0 +1,35 @@ +{ + "name": "MintHCM", + "slug": "minthcm", + "categories": [ + 25 + ], + "date_created": "2025-12-12", + "type": "ct", + "updateable": false, + "privileged": false, + "interface_port": 80, + "documentation": "https://wiki.minthcm.org/", + "config_path": "/var/www/MintHCM", + "website": "https://minthcm.org/", + "logo": "https://minthcm.org/wp-content/uploads/2021/03/minthcm-logo.svg", + "description": "MintCHM is a free and open-source tool for Human Capital Management.\n\nMain features:\nrecruitment\ntime management\nonboarding & offboarding\ncalendar\nleave management\nresources booking\ntravel & expenses\nworkplace management\nanalytics\nroles & permissions management\njob descriptions\nemployer branding\nemployee profiles\ncompetences & skills\nemployment history\nemployee evaluations\niOS & Android mobile apps\nMint based on two popular, well-known business applications: SugarCRM Community Edition and SuiteCRM. This is why we often say that MintHCM is CRM reinvented.", + "install_methods": [ + { + "type": "default", + "script": "ct/minthcm.sh", + "resources": { + "cpu": 4, + "ram": 4096, + "hdd": 20, + "os": "debian", + "version": "13" + } + } + ], + "default_credentials": { + "username": "admin", + "password": "minthcm" + }, + "notes": [] +} diff --git a/install/minthcm-install.sh b/install/minthcm-install.sh new file mode 100644 index 000000000..8a169a58e --- /dev/null +++ b/install/minthcm-install.sh @@ -0,0 +1,190 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2025 minthcm +# Author: MintHCM +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE +# Source: https://github.com/minthcm/minthcm +source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" + +color +verb_ip6 +catch_errors +setting_up_container +network_check +update_os + +APP_NAME="MintHCM" +MINT_REPO="https://github.com/minthcm/minthcm.git" +MINT_DIR="/var/www/MintHCM" +PHP_VERSION="8.2" + +# Install base packages required for MintHCM and system management +msg_info "Installing base packages" +$STD apt-get install -y git curl cron +msg_ok "Base packages installed" + +# PHP + Apache +msg_info "Setting up PHP ${PHP_VERSION}" +PHP_APACHE="YES" PHP_VERSION="${PHP_VERSION}" PHP_MODULE="mysql,cli,redis" PHP_FPM="YES" setup_php +msg_ok "PHP ${PHP_VERSION} and required extensions installed" + +msg_info "Setting up Composer" +setup_composer || msg_error "Failed to setup Composer" +msg_ok "Composer setup completed" + +msg_info "Enabling Apache modules (rewrite, headers)" +$STD a2enmod rewrite +$STD a2enmod headers +msg_ok "Apache2 with rewrite and headers modules configured" + +# MintHCM configuration files +msg_info "Downloading PHP configuration for MintHCM" +PHP_MODS_DIR="/etc/php/${PHP_VERSION}/mods-available" +PHP_MINTHCM_INI="${PHP_MODS_DIR}/php-minthcm.ini" + +mkdir -p "${PHP_MODS_DIR}" + +curl -fsSL \ + "https://raw.githubusercontent.com/minthcm/minthcm/master/docker/config/php-minthcm.ini" \ + -o "${PHP_MINTHCM_INI}" \ + || msg_error "Failed to download php-minthcm.ini" + +mkdir -p "/etc/php/${PHP_VERSION}/cli/conf.d" "/etc/php/${PHP_VERSION}/apache2/conf.d" + +if [[ ! -e "/etc/php/${PHP_VERSION}/cli/conf.d/20-minthcm.ini" ]]; then + ln -s "${PHP_MINTHCM_INI}" "/etc/php/${PHP_VERSION}/cli/conf.d/20-minthcm.ini" \ + || msg_error "Failed to create CLI symlink for php-minthcm.ini" +fi + +if [[ ! -e "/etc/php/${PHP_VERSION}/apache2/conf.d/20-minthcm.ini" ]]; then + ln -s "${PHP_MINTHCM_INI}" "/etc/php/${PHP_VERSION}/apache2/conf.d/20-minthcm.ini" \ + || msg_error "Failed to create Apache symlink for php-minthcm.ini" +fi + +msg_ok "PHP configuration for MintHCM applied" + +# Apache VirtualHost configuration for MintHCM +msg_info "Downloading Apache VirtualHost configuration for MintHCM" +curl -fsSL \ + "https://raw.githubusercontent.com/minthcm/minthcm/master/docker/config/000-default.conf" \ + -o "/etc/apache2/sites-available/000-default.conf" \ + || msg_error "Failed to download 000-default.conf" +msg_ok "Apache VirtualHost configuration updated for MintHCM" + +# Clone MintHCM repository into the target directory +msg_info "Cloning MintHCM repository" +if [[ -d "${MINT_DIR}" ]]; then + msg_warn "Directory ${MINT_DIR} already exists, skipping clone" +else + mkdir -p "$(dirname "${MINT_DIR}")" + $STD git clone --depth=1 "${MINT_REPO}" "${MINT_DIR}" || msg_error "Failed to clone MintHCM repository" +fi +msg_ok "MintHCM repository available at ${MINT_DIR}" + +# Set ownership and permissions for MintHCM directory +msg_info "Setting ownership and permissions for MintHCM directory" +git config --global --add safe.directory "${MINT_DIR}" +chown -R www-data:www-data "${MINT_DIR}" +find "${MINT_DIR}" -type d -exec chmod 755 {} \; +find "${MINT_DIR}" -type f -exec chmod 644 {} \; +msg_ok "Ownership and permissions for MintHCM directory set" + +# Restart Apache2 to apply all new configuration +msg_info "Restarting Apache2 with new configuration" +$STD systemctl restart apache2 || msg_error "Failed to restart Apache2" +msg_ok "Apache2 restarted" + +# Elasticsearch +msg_info "Setting up Elasticsearch" +setup_deb822_repo \ + "elasticsearch" \ + "https://artifacts.elastic.co/GPG-KEY-elasticsearch" \ + "https://artifacts.elastic.co/packages/7.x/apt" \ + "stable" \ + "main" + +$STD apt install -y elasticsearch || msg_error "Failed to install Elasticsearch" + +echo "-Xms2g" >>/etc/elasticsearch/jvm.options +echo "-Xmx2g" >>/etc/elasticsearch/jvm.options + +$STD /usr/share/elasticsearch/bin/elasticsearch-plugin install ingest-attachment -b \ + || msg_error "Failed to install Elasticsearch ingest-attachment plugin" + +systemctl enable -q elasticsearch +systemctl restart -q elasticsearch +msg_ok "Elasticsearch setup completed" + +# MariaDB +msg_info "Setting up MariaDB" +setup_mariadb || msg_error "Failed to setup MariaDB" +$STD mariadb -u root -e "SET GLOBAL sql_mode=''"; +msg_ok "MariaDB setup completed" + +msg_info "Configuring database for MintHCM" +DB_USER="minthcm" +DB_PASS=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | head -c13) + +$STD mariadb -u root -e "CREATE USER '${DB_USER}'@'localhost' IDENTIFIED BY '${DB_PASS}';" + +$STD mariadb -u root -e "GRANT ALL ON *.* TO '${DB_USER}'@'localhost'; FLUSH PRIVILEGES;" + +msg_ok "Configured MariaDB for MintHCM" + +#MintHCM config generate +msg_info "Downloading generate_config.php script" +mkdir -p /var/www/script + +curl -fsSL \ + "https://raw.githubusercontent.com/minthcm/minthcm/master/docker/script/generate_config.php" \ + -o "/var/www/script/generate_config.php" \ + || msg_error "Failed to download generate_config.php" + +chown -R www-data:www-data /var/www/script +msg_ok "generate_config.php script downloaded" + +export DB_HOST=localhost +export DB_NAME=minthcm +export DB_PORT=3306 +export DB_USER=minthcm +export DB_PASS=$DB_PASS +export MINT_URL=localhost +export MINT_USER=admin +export MINT_PASS=minthcm +export ELASTICSEARCH_HOST=localhost + +{ + echo "MintHCM DB Credentials" + echo "MariaDB User: $DB_USER" + echo "MariaDB Password: $DB_PASS" +} >>~/minthcm.creds + +msg_info "Generating MintHCM configuration file (configMint4)" +php /var/www/script/generate_config.php || msg_error "Failed to execute generate_config.php" + +if [[ ! -f /var/www/MintHCM/configMint4 ]]; then + msg_error "Error: Failed to generate configMint4 - please check the configuration" + exit 1 +fi +msg_ok "configMint4 generated" +#MintHCM installation +msg_info "Starting MintHCM installation..." +cd /var/www/MintHCM && su -s /bin/bash -c 'php /var/www/MintHCM/MintCLI install < /var/www/MintHCM/configMint4' www-data + +if [[ $? -ne 0 ]]; then + msg_error "Error: MintHCM installation failed - please check logs" +else + msg_ok "MintHCM installation completed!" + msg_info "Configuring cron for MintHCM" + printf "* * * * * cd /var/www/MintHCM/legacy; php -f cron.php > /dev/null 2>&1\n" > /var/spool/cron/crontabs/www-data \ + || msg_error "Failed to configure cron for www-data" + service cron start || msg_error "Failed to start cron service" + rm -f /var/www/MintHCM/configMint4 +fi + + +msg_ok "${APP_NAME} has been installed. Make sure to configure the database and other parameters according to the MintHCM documentation." + +motd_ssh +customize +cleanup_lxc From b9534031c38c75ef65af41cb942e75c604e2ca41 Mon Sep 17 00:00:00 2001 From: MintHCM-admin Date: Thu, 18 Dec 2025 10:07:52 +0100 Subject: [PATCH 02/27] fix --- ct/minthcm.sh | 14 ++-- install/minthcm-install.sh | 145 +++++++++++-------------------------- 2 files changed, 46 insertions(+), 113 deletions(-) diff --git a/ct/minthcm.sh b/ct/minthcm.sh index 522b97086..c6f4c689f 100644 --- a/ct/minthcm.sh +++ b/ct/minthcm.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func) +source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/build.func) # Copyright (c) 2021-2025 minthcm # Author: MintHCM # License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE @@ -18,16 +18,12 @@ header_info "$APP" variables color catch_errors - function update_script() { - header_info "$APP" + header_info check_container_storage check_container_resources - - INSTALL_DIR="/var/www/MintHCM" - - if [[ ! -d "${INSTALL_DIR}" ]] || [[ ! -d "${INSTALL_DIR}/.git" ]]; then - msg_error "No ${APP} installation found in ${INSTALL_DIR}!" + if [[ ! -d /var/www/MintHCM ]]; then + msg_error "No ${APP} Installation Found!" exit fi msg_error "Currently we don't provide an update function for this ${APP}." @@ -40,5 +36,5 @@ 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 (after DB & installer are completed):${CL}" +echo -e "${INFO}${YW} Access it using the following URL:${CL}" echo -e "${TAB}${GATEWAY}${BGN}http://${IP}${CL}" diff --git a/install/minthcm-install.sh b/install/minthcm-install.sh index 8a169a58e..b4e99ffcd 100644 --- a/install/minthcm-install.sh +++ b/install/minthcm-install.sh @@ -13,88 +13,43 @@ setting_up_container network_check update_os -APP_NAME="MintHCM" MINT_REPO="https://github.com/minthcm/minthcm.git" -MINT_DIR="/var/www/MintHCM" -PHP_VERSION="8.2" -# Install base packages required for MintHCM and system management -msg_info "Installing base packages" -$STD apt-get install -y git curl cron -msg_ok "Base packages installed" - -# PHP + Apache -msg_info "Setting up PHP ${PHP_VERSION}" -PHP_APACHE="YES" PHP_VERSION="${PHP_VERSION}" PHP_MODULE="mysql,cli,redis" PHP_FPM="YES" setup_php -msg_ok "PHP ${PHP_VERSION} and required extensions installed" +msg_info "Setting up PHP 8.2" +PHP_APACHE="YES" PHP_VERSION="8.2" PHP_MODULE="mysql,cli,redis" PHP_FPM="YES" setup_php +msg_ok "Set up PHP 8.2" msg_info "Setting up Composer" -setup_composer || msg_error "Failed to setup Composer" -msg_ok "Composer setup completed" +setup_composer +msg_ok "Set up Composer" msg_info "Enabling Apache modules (rewrite, headers)" $STD a2enmod rewrite $STD a2enmod headers -msg_ok "Apache2 with rewrite and headers modules configured" +msg_ok "Enabled Apache modules (rewrite, headers)" -# MintHCM configuration files -msg_info "Downloading PHP configuration for MintHCM" -PHP_MODS_DIR="/etc/php/${PHP_VERSION}/mods-available" -PHP_MINTHCM_INI="${PHP_MODS_DIR}/php-minthcm.ini" +fetch_and_deploy_gh_release "MintHCM" "minthcm/minthcm" "tarball" "latest" "/var/www/MintHCM" -mkdir -p "${PHP_MODS_DIR}" +msg_info "Configuring PHP and Apache2 for MintHCM" +mkdir -p /etc/php/8.2/mods-available +cp /var/www/MintHCM/docker/config/000-default.conf /etc/apache2/sites-available/000-default.conf +cp /var/www/MintHCM/docker/config/php-minthcm.ini /etc/php/8.2/mods-available/php-minthcm.ini +mkdir -p "/etc/php/8.2/cli/conf.d" "/etc/php/8.2/apache2/conf.d" +ln -s "/etc/php/8.2/mods-available/php-minthcm.ini" "/etc/php/8.2/cli/conf.d/20-minthcm.ini" +ln -s "/etc/php/8.2/mods-available/php-minthcm.ini" "/etc/php/8.2/apache2/conf.d/20-minthcm.ini" +msg_ok "Configured PHP and Apache2 for MintHCM" -curl -fsSL \ - "https://raw.githubusercontent.com/minthcm/minthcm/master/docker/config/php-minthcm.ini" \ - -o "${PHP_MINTHCM_INI}" \ - || msg_error "Failed to download php-minthcm.ini" - -mkdir -p "/etc/php/${PHP_VERSION}/cli/conf.d" "/etc/php/${PHP_VERSION}/apache2/conf.d" - -if [[ ! -e "/etc/php/${PHP_VERSION}/cli/conf.d/20-minthcm.ini" ]]; then - ln -s "${PHP_MINTHCM_INI}" "/etc/php/${PHP_VERSION}/cli/conf.d/20-minthcm.ini" \ - || msg_error "Failed to create CLI symlink for php-minthcm.ini" -fi - -if [[ ! -e "/etc/php/${PHP_VERSION}/apache2/conf.d/20-minthcm.ini" ]]; then - ln -s "${PHP_MINTHCM_INI}" "/etc/php/${PHP_VERSION}/apache2/conf.d/20-minthcm.ini" \ - || msg_error "Failed to create Apache symlink for php-minthcm.ini" -fi - -msg_ok "PHP configuration for MintHCM applied" - -# Apache VirtualHost configuration for MintHCM -msg_info "Downloading Apache VirtualHost configuration for MintHCM" -curl -fsSL \ - "https://raw.githubusercontent.com/minthcm/minthcm/master/docker/config/000-default.conf" \ - -o "/etc/apache2/sites-available/000-default.conf" \ - || msg_error "Failed to download 000-default.conf" -msg_ok "Apache VirtualHost configuration updated for MintHCM" - -# Clone MintHCM repository into the target directory -msg_info "Cloning MintHCM repository" -if [[ -d "${MINT_DIR}" ]]; then - msg_warn "Directory ${MINT_DIR} already exists, skipping clone" -else - mkdir -p "$(dirname "${MINT_DIR}")" - $STD git clone --depth=1 "${MINT_REPO}" "${MINT_DIR}" || msg_error "Failed to clone MintHCM repository" -fi -msg_ok "MintHCM repository available at ${MINT_DIR}" - -# Set ownership and permissions for MintHCM directory msg_info "Setting ownership and permissions for MintHCM directory" -git config --global --add safe.directory "${MINT_DIR}" -chown -R www-data:www-data "${MINT_DIR}" -find "${MINT_DIR}" -type d -exec chmod 755 {} \; -find "${MINT_DIR}" -type f -exec chmod 644 {} \; -msg_ok "Ownership and permissions for MintHCM directory set" +git config --global --add safe.directory /var/www/MintHCM +chown -R www-data:www-data /var/www/MintHCM +find /var/www/MintHCM -type d -exec chmod 755 {} \; +find /var/www/MintHCM -type f -exec chmod 644 {} \; +msg_ok "Set up ownership and permissions for MintHCM directory" -# Restart Apache2 to apply all new configuration -msg_info "Restarting Apache2 with new configuration" -$STD systemctl restart apache2 || msg_error "Failed to restart Apache2" -msg_ok "Apache2 restarted" +msg_info "Restarting Apache2" +$STD systemctl restart apache2 +msg_ok "Restarted Apache2" -# Elasticsearch msg_info "Setting up Elasticsearch" setup_deb822_repo \ "elasticsearch" \ @@ -103,55 +58,39 @@ setup_deb822_repo \ "stable" \ "main" -$STD apt install -y elasticsearch || msg_error "Failed to install Elasticsearch" +$STD apt install -y elasticsearch echo "-Xms2g" >>/etc/elasticsearch/jvm.options echo "-Xmx2g" >>/etc/elasticsearch/jvm.options -$STD /usr/share/elasticsearch/bin/elasticsearch-plugin install ingest-attachment -b \ - || msg_error "Failed to install Elasticsearch ingest-attachment plugin" +$STD /usr/share/elasticsearch/bin/elasticsearch-plugin install ingest-attachment -b -systemctl enable -q elasticsearch -systemctl restart -q elasticsearch -msg_ok "Elasticsearch setup completed" +systemctl enable -q --now elasticsearch +msg_ok "Set up Elasticsearch" -# MariaDB msg_info "Setting up MariaDB" -setup_mariadb || msg_error "Failed to setup MariaDB" +setup_mariadb $STD mariadb -u root -e "SET GLOBAL sql_mode=''"; -msg_ok "MariaDB setup completed" +msg_ok "Set up MariaDB" msg_info "Configuring database for MintHCM" -DB_USER="minthcm" + DB_PASS=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | head -c13) - -$STD mariadb -u root -e "CREATE USER '${DB_USER}'@'localhost' IDENTIFIED BY '${DB_PASS}';" - -$STD mariadb -u root -e "GRANT ALL ON *.* TO '${DB_USER}'@'localhost'; FLUSH PRIVILEGES;" - +$STD mariadb -u root -e "CREATE USER 'minthcm'@'localhost' IDENTIFIED BY '${DB_PASS}';" +$STD mariadb -u root -e "GRANT ALL ON *.* TO 'minthcm'@'localhost'; FLUSH PRIVILEGES;" msg_ok "Configured MariaDB for MintHCM" -#MintHCM config generate msg_info "Downloading generate_config.php script" mkdir -p /var/www/script - -curl -fsSL \ - "https://raw.githubusercontent.com/minthcm/minthcm/master/docker/script/generate_config.php" \ - -o "/var/www/script/generate_config.php" \ - || msg_error "Failed to download generate_config.php" - +cp /var/www/MintHCM/docker/script/generate_config.php /var/www/script/generate_config.php chown -R www-data:www-data /var/www/script -msg_ok "generate_config.php script downloaded" +msg_ok "Downloading generate_config.php script" -export DB_HOST=localhost -export DB_NAME=minthcm -export DB_PORT=3306 -export DB_USER=minthcm -export DB_PASS=$DB_PASS -export MINT_URL=localhost -export MINT_USER=admin -export MINT_PASS=minthcm -export ELASTICSEARCH_HOST=localhost +cp /var/www/MintHCM/docker/.env /var/www/script/.env +sed -i 's/^DB_HOST=.*/DB_HOST=localhost/' /var/www/script/.env +sed -i 's/^DB_USER=.*/DB_USER=minthcm/' /var/www/script/.env +sed -i "s/^DB_PASS=.*/DB_PASS=${DB_PASS}/" /var/www/script/.env +sed -i 's/^ELASTICSEARCH_HOST=.*/ELASTICSEARCH_HOST=localhost/' /var/www/script/.env { echo "MintHCM DB Credentials" @@ -166,8 +105,8 @@ if [[ ! -f /var/www/MintHCM/configMint4 ]]; then msg_error "Error: Failed to generate configMint4 - please check the configuration" exit 1 fi -msg_ok "configMint4 generated" -#MintHCM installation +msg_ok "Generated MintHCM configuration file (configMint4)" + msg_info "Starting MintHCM installation..." cd /var/www/MintHCM && su -s /bin/bash -c 'php /var/www/MintHCM/MintCLI install < /var/www/MintHCM/configMint4' www-data @@ -183,8 +122,6 @@ else fi -msg_ok "${APP_NAME} has been installed. Make sure to configure the database and other parameters according to the MintHCM documentation." - motd_ssh customize cleanup_lxc From 1bde893dd9b9b3304b70f498d4434ed6e3021fa5 Mon Sep 17 00:00:00 2001 From: MintHCM-admin Date: Thu, 18 Dec 2025 10:31:19 +0100 Subject: [PATCH 03/27] change urls for testing purposes --- ct/minthcm.sh | 2 +- install/minthcm-install.sh | 2 -- misc/build.func | 8 ++++---- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/ct/minthcm.sh b/ct/minthcm.sh index c6f4c689f..353473586 100644 --- a/ct/minthcm.sh +++ b/ct/minthcm.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/build.func) +source <(curl -fsSL https://raw.githubusercontent.com/minthcm/ProxmoxVED/feature/minthcm/misc/build.func) # Copyright (c) 2021-2025 minthcm # Author: MintHCM # License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE diff --git a/install/minthcm-install.sh b/install/minthcm-install.sh index b4e99ffcd..660a6dc55 100644 --- a/install/minthcm-install.sh +++ b/install/minthcm-install.sh @@ -13,8 +13,6 @@ setting_up_container network_check update_os -MINT_REPO="https://github.com/minthcm/minthcm.git" - msg_info "Setting up PHP 8.2" PHP_APACHE="YES" PHP_VERSION="8.2" PHP_MODULE="mysql,cli,redis" PHP_FPM="YES" setup_php msg_ok "Set up PHP 8.2" diff --git a/misc/build.func b/misc/build.func index 7ce994d1e..5427067ec 100644 --- a/misc/build.func +++ b/misc/build.func @@ -91,7 +91,7 @@ variables() { # FUNC_DIR="/usr/local/community-scripts/core" # mkdir -p "$FUNC_DIR" -# BUILD_URL="https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/build.func" +# BUILD_URL="https://raw.githubusercontent.com/minthcm/ProxmoxVED/feature/minthcm/misc/build.func" # BUILD_REV="$FUNC_DIR/build.rev" # DEVMODE="${DEVMODE:-no}" @@ -116,7 +116,7 @@ variables() { # update_func_file() { # local file="$1" -# local url="https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/$file" +# local url="https://raw.githubusercontent.com/minthcm/ProxmoxVED/feature/minthcm/misc/$file" # local local_path="$FUNC_DIR/$file" # echo "⬇️ Downloading $file ..." @@ -3199,7 +3199,7 @@ EOF' set +Eeuo pipefail # Disable ALL error handling temporarily trap - ERR # Remove ERR trap completely - lxc-attach -n "$CTID" -- bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/install/${var_install}.sh)" + lxc-attach -n "$CTID" -- bash -c "$(curl -fsSL https://raw.githubusercontent.com/minthcm/ProxmoxVED/feature/minthcm/install/${var_install}.sh)" local lxc_exit=$? set -Eeuo pipefail # Re-enable error handling @@ -3286,7 +3286,7 @@ EOF' if [[ "${DEV_MODE_MOTD:-false}" == "true" ]]; then echo -e "${TAB}${HOLD}${DGN}Setting up MOTD and SSH for debugging...${CL}" if pct exec "$CTID" -- bash -c " - source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/install.func) + source <(curl -fsSL https://raw.githubusercontent.com/minthcm/ProxmoxVED/feature/minthcm/misc/install.func) declare -f motd_ssh >/dev/null 2>&1 && motd_ssh || true " >/dev/null 2>&1; then local ct_ip=$(pct exec "$CTID" ip a s dev eth0 2>/dev/null | awk '/inet / {print $2}' | cut -d/ -f1) From 5b85d87041852d249d80f42145d1778fdce701c6 Mon Sep 17 00:00:00 2001 From: MintHCM-admin Date: Thu, 18 Dec 2025 10:37:57 +0100 Subject: [PATCH 04/27] sqlmode fix + no git --- install/minthcm-install.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/install/minthcm-install.sh b/install/minthcm-install.sh index 660a6dc55..c67365baf 100644 --- a/install/minthcm-install.sh +++ b/install/minthcm-install.sh @@ -38,7 +38,6 @@ ln -s "/etc/php/8.2/mods-available/php-minthcm.ini" "/etc/php/8.2/apache2/conf.d msg_ok "Configured PHP and Apache2 for MintHCM" msg_info "Setting ownership and permissions for MintHCM directory" -git config --global --add safe.directory /var/www/MintHCM chown -R www-data:www-data /var/www/MintHCM find /var/www/MintHCM -type d -exec chmod 755 {} \; find /var/www/MintHCM -type f -exec chmod 644 {} \; @@ -68,7 +67,7 @@ msg_ok "Set up Elasticsearch" msg_info "Setting up MariaDB" setup_mariadb -$STD mariadb -u root -e "SET GLOBAL sql_mode=''"; +$STD mariadb -u root -e "SET GLOBAL sql_mode='STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION'"; msg_ok "Set up MariaDB" msg_info "Configuring database for MintHCM" From e0dee3885270a204646f6db892646999c3813263 Mon Sep 17 00:00:00 2001 From: MintHCM-admin Date: Thu, 18 Dec 2025 10:46:42 +0100 Subject: [PATCH 05/27] fix variables --- install/minthcm-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/minthcm-install.sh b/install/minthcm-install.sh index c67365baf..29b0fe382 100644 --- a/install/minthcm-install.sh +++ b/install/minthcm-install.sh @@ -91,7 +91,7 @@ sed -i 's/^ELASTICSEARCH_HOST=.*/ELASTICSEARCH_HOST=localhost/' /var/www/script/ { echo "MintHCM DB Credentials" - echo "MariaDB User: $DB_USER" + echo "MariaDB User: minthcm" echo "MariaDB Password: $DB_PASS" } >>~/minthcm.creds From cf4e39ad1079b40220e4009a69dad94bcdbd98ff Mon Sep 17 00:00:00 2001 From: MintHCM-admin Date: Thu, 18 Dec 2025 11:02:57 +0100 Subject: [PATCH 06/27] .env file --- install/minthcm-install.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/install/minthcm-install.sh b/install/minthcm-install.sh index 29b0fe382..77b879ece 100644 --- a/install/minthcm-install.sh +++ b/install/minthcm-install.sh @@ -96,6 +96,9 @@ sed -i 's/^ELASTICSEARCH_HOST=.*/ELASTICSEARCH_HOST=localhost/' /var/www/script/ } >>~/minthcm.creds msg_info "Generating MintHCM configuration file (configMint4)" +set -a +source /var/www/script/.env +set +a php /var/www/script/generate_config.php || msg_error "Failed to execute generate_config.php" if [[ ! -f /var/www/MintHCM/configMint4 ]]; then From a525cada4c5b4b002c18db8488979b1cd7f1087f Mon Sep 17 00:00:00 2001 From: MintHCM-admin Date: Thu, 18 Dec 2025 11:15:34 +0100 Subject: [PATCH 07/27] revert urls change --- ct/minthcm.sh | 2 +- misc/build.func | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ct/minthcm.sh b/ct/minthcm.sh index 353473586..c6f4c689f 100644 --- a/ct/minthcm.sh +++ b/ct/minthcm.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -source <(curl -fsSL https://raw.githubusercontent.com/minthcm/ProxmoxVED/feature/minthcm/misc/build.func) +source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/build.func) # Copyright (c) 2021-2025 minthcm # Author: MintHCM # License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE diff --git a/misc/build.func b/misc/build.func index 5427067ec..7ce994d1e 100644 --- a/misc/build.func +++ b/misc/build.func @@ -91,7 +91,7 @@ variables() { # FUNC_DIR="/usr/local/community-scripts/core" # mkdir -p "$FUNC_DIR" -# BUILD_URL="https://raw.githubusercontent.com/minthcm/ProxmoxVED/feature/minthcm/misc/build.func" +# BUILD_URL="https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/build.func" # BUILD_REV="$FUNC_DIR/build.rev" # DEVMODE="${DEVMODE:-no}" @@ -116,7 +116,7 @@ variables() { # update_func_file() { # local file="$1" -# local url="https://raw.githubusercontent.com/minthcm/ProxmoxVED/feature/minthcm/misc/$file" +# local url="https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/$file" # local local_path="$FUNC_DIR/$file" # echo "⬇️ Downloading $file ..." @@ -3199,7 +3199,7 @@ EOF' set +Eeuo pipefail # Disable ALL error handling temporarily trap - ERR # Remove ERR trap completely - lxc-attach -n "$CTID" -- bash -c "$(curl -fsSL https://raw.githubusercontent.com/minthcm/ProxmoxVED/feature/minthcm/install/${var_install}.sh)" + lxc-attach -n "$CTID" -- bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/install/${var_install}.sh)" local lxc_exit=$? set -Eeuo pipefail # Re-enable error handling @@ -3286,7 +3286,7 @@ EOF' if [[ "${DEV_MODE_MOTD:-false}" == "true" ]]; then echo -e "${TAB}${HOLD}${DGN}Setting up MOTD and SSH for debugging...${CL}" if pct exec "$CTID" -- bash -c " - source <(curl -fsSL https://raw.githubusercontent.com/minthcm/ProxmoxVED/feature/minthcm/misc/install.func) + source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/install.func) declare -f motd_ssh >/dev/null 2>&1 && motd_ssh || true " >/dev/null 2>&1; then local ct_ip=$(pct exec "$CTID" ip a s dev eth0 2>/dev/null | awk '/inet / {print $2}' | cut -d/ -f1) From 671a7f12c93f45981ebb68e8d018c57d8bb8347c Mon Sep 17 00:00:00 2001 From: MintHCM-admin Date: Thu, 18 Dec 2025 13:56:16 +0100 Subject: [PATCH 08/27] add note --- frontend/public/json/minthcm.json | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/frontend/public/json/minthcm.json b/frontend/public/json/minthcm.json index 226f802cb..680212e52 100644 --- a/frontend/public/json/minthcm.json +++ b/frontend/public/json/minthcm.json @@ -31,5 +31,10 @@ "username": "admin", "password": "minthcm" }, - "notes": [] + "notes": [ + { + "text": "Database credentials are stored in ~/minthcm.creds", + "type": "info" + } + ] } From 36814cb0fbfab78c45f967e9f60e6c586260e671 Mon Sep 17 00:00:00 2001 From: MintHCM-admin Date: Mon, 22 Dec 2025 08:11:35 +0100 Subject: [PATCH 09/27] removed msg_info, fix description --- frontend/public/json/minthcm.json | 2 +- install/minthcm-install.sh | 4 ---- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/frontend/public/json/minthcm.json b/frontend/public/json/minthcm.json index 680212e52..a901a7cb3 100644 --- a/frontend/public/json/minthcm.json +++ b/frontend/public/json/minthcm.json @@ -13,7 +13,7 @@ "config_path": "/var/www/MintHCM", "website": "https://minthcm.org/", "logo": "https://minthcm.org/wp-content/uploads/2021/03/minthcm-logo.svg", - "description": "MintCHM is a free and open-source tool for Human Capital Management.\n\nMain features:\nrecruitment\ntime management\nonboarding & offboarding\ncalendar\nleave management\nresources booking\ntravel & expenses\nworkplace management\nanalytics\nroles & permissions management\njob descriptions\nemployer branding\nemployee profiles\ncompetences & skills\nemployment history\nemployee evaluations\niOS & Android mobile apps\nMint based on two popular, well-known business applications: SugarCRM Community Edition and SuiteCRM. This is why we often say that MintHCM is CRM reinvented.", + "description": "MintCHM is a free and open-source tool for Human Capital Management. Main features: recruitment, time management, onboarding & offboarding, calendar, leave management, resources booking, travel & expenses, workplace management, analytics, roles & permissions management, job descriptions, employer branding, employee profiles, competences & skills, employment history, employee evaluations, iOS & Android mobile apps. Mint based on two popular, well-known business applications: SugarCRM Community Edition and SuiteCRM. This is why we often say that MintHCM is CRM reinvented.", "install_methods": [ { "type": "default", diff --git a/install/minthcm-install.sh b/install/minthcm-install.sh index 77b879ece..b7e0c4c4c 100644 --- a/install/minthcm-install.sh +++ b/install/minthcm-install.sh @@ -13,13 +13,9 @@ setting_up_container network_check update_os -msg_info "Setting up PHP 8.2" PHP_APACHE="YES" PHP_VERSION="8.2" PHP_MODULE="mysql,cli,redis" PHP_FPM="YES" setup_php -msg_ok "Set up PHP 8.2" -msg_info "Setting up Composer" setup_composer -msg_ok "Set up Composer" msg_info "Enabling Apache modules (rewrite, headers)" $STD a2enmod rewrite From 93dc41e30bf517a80eae4a8511694c1ef275eb79 Mon Sep 17 00:00:00 2001 From: MintHCM <51930758+MintHCM-admin@users.noreply.github.com> Date: Mon, 22 Dec 2025 08:12:02 +0100 Subject: [PATCH 10/27] Update install/minthcm-install.sh Co-authored-by: Tobias <96661824+CrazyWolf13@users.noreply.github.com> --- install/minthcm-install.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/install/minthcm-install.sh b/install/minthcm-install.sh index b7e0c4c4c..621c86343 100644 --- a/install/minthcm-install.sh +++ b/install/minthcm-install.sh @@ -15,6 +15,7 @@ update_os PHP_APACHE="YES" PHP_VERSION="8.2" PHP_MODULE="mysql,cli,redis" PHP_FPM="YES" setup_php +setup_composer setup_composer msg_info "Enabling Apache modules (rewrite, headers)" From 8732ffd8e6868b23a220c53a8095fcf61d86c887 Mon Sep 17 00:00:00 2001 From: MintHCM-admin Date: Mon, 22 Dec 2025 08:12:41 +0100 Subject: [PATCH 11/27] fix 2 composers --- install/minthcm-install.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/install/minthcm-install.sh b/install/minthcm-install.sh index 621c86343..b7e0c4c4c 100644 --- a/install/minthcm-install.sh +++ b/install/minthcm-install.sh @@ -15,7 +15,6 @@ update_os PHP_APACHE="YES" PHP_VERSION="8.2" PHP_MODULE="mysql,cli,redis" PHP_FPM="YES" setup_php -setup_composer setup_composer msg_info "Enabling Apache modules (rewrite, headers)" From a84a1bc467a6e7c9b4ae4311db1ae434736a5370 Mon Sep 17 00:00:00 2001 From: MintHCM <51930758+MintHCM-admin@users.noreply.github.com> Date: Tue, 23 Dec 2025 08:49:42 +0100 Subject: [PATCH 12/27] Update install/minthcm-install.sh Co-authored-by: Tobias <96661824+CrazyWolf13@users.noreply.github.com> --- install/minthcm-install.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/install/minthcm-install.sh b/install/minthcm-install.sh index b7e0c4c4c..42143428f 100644 --- a/install/minthcm-install.sh +++ b/install/minthcm-install.sh @@ -14,7 +14,6 @@ network_check update_os PHP_APACHE="YES" PHP_VERSION="8.2" PHP_MODULE="mysql,cli,redis" PHP_FPM="YES" setup_php - setup_composer msg_info "Enabling Apache modules (rewrite, headers)" From dbfaeb7f4fa60e59f0c632bd8a144066801f6179 Mon Sep 17 00:00:00 2001 From: MintHCM <51930758+MintHCM-admin@users.noreply.github.com> Date: Tue, 23 Dec 2025 08:52:17 +0100 Subject: [PATCH 13/27] Update install/minthcm-install.sh Co-authored-by: Tobias <96661824+CrazyWolf13@users.noreply.github.com> --- install/minthcm-install.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/install/minthcm-install.sh b/install/minthcm-install.sh index 42143428f..6b727e1f0 100644 --- a/install/minthcm-install.sh +++ b/install/minthcm-install.sh @@ -49,7 +49,6 @@ setup_deb822_repo \ "https://artifacts.elastic.co/packages/7.x/apt" \ "stable" \ "main" - $STD apt install -y elasticsearch echo "-Xms2g" >>/etc/elasticsearch/jvm.options From 41e9b03a424606afc4f937ce51855ab42875a700 Mon Sep 17 00:00:00 2001 From: MintHCM-admin Date: Tue, 23 Dec 2025 08:54:07 +0100 Subject: [PATCH 14/27] remove msg_error --- install/minthcm-install.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/install/minthcm-install.sh b/install/minthcm-install.sh index 6b727e1f0..25976cb8d 100644 --- a/install/minthcm-install.sh +++ b/install/minthcm-install.sh @@ -110,8 +110,7 @@ else msg_ok "MintHCM installation completed!" msg_info "Configuring cron for MintHCM" printf "* * * * * cd /var/www/MintHCM/legacy; php -f cron.php > /dev/null 2>&1\n" > /var/spool/cron/crontabs/www-data \ - || msg_error "Failed to configure cron for www-data" - service cron start || msg_error "Failed to start cron service" + service cron start rm -f /var/www/MintHCM/configMint4 fi From bd4fc92ac42cf8f5c4753697832c3ab748010e70 Mon Sep 17 00:00:00 2001 From: MintHCM-admin Date: Tue, 23 Dec 2025 08:56:27 +0100 Subject: [PATCH 15/27] remove error checks --- install/minthcm-install.sh | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) diff --git a/install/minthcm-install.sh b/install/minthcm-install.sh index 25976cb8d..4f5a2de20 100644 --- a/install/minthcm-install.sh +++ b/install/minthcm-install.sh @@ -94,25 +94,17 @@ set -a source /var/www/script/.env set +a php /var/www/script/generate_config.php || msg_error "Failed to execute generate_config.php" - -if [[ ! -f /var/www/MintHCM/configMint4 ]]; then - msg_error "Error: Failed to generate configMint4 - please check the configuration" - exit 1 -fi msg_ok "Generated MintHCM configuration file (configMint4)" msg_info "Starting MintHCM installation..." cd /var/www/MintHCM && su -s /bin/bash -c 'php /var/www/MintHCM/MintCLI install < /var/www/MintHCM/configMint4' www-data -if [[ $? -ne 0 ]]; then - msg_error "Error: MintHCM installation failed - please check logs" -else - msg_ok "MintHCM installation completed!" - msg_info "Configuring cron for MintHCM" - printf "* * * * * cd /var/www/MintHCM/legacy; php -f cron.php > /dev/null 2>&1\n" > /var/spool/cron/crontabs/www-data \ - service cron start - rm -f /var/www/MintHCM/configMint4 -fi +msg_ok "MintHCM installation completed!" +msg_info "Configuring cron for MintHCM" +printf "* * * * * cd /var/www/MintHCM/legacy; php -f cron.php > /dev/null 2>&1\n" > /var/spool/cron/crontabs/www-data +service cron start +rm -f /var/www/MintHCM/configMint4 + motd_ssh From 410bcdfa47bc77f7fc2991c2e0ca76366e3e6037 Mon Sep 17 00:00:00 2001 From: MintHCM-admin Date: Tue, 23 Dec 2025 08:57:07 +0100 Subject: [PATCH 16/27] remove msg_error --- install/minthcm-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/minthcm-install.sh b/install/minthcm-install.sh index 4f5a2de20..e8cd964a4 100644 --- a/install/minthcm-install.sh +++ b/install/minthcm-install.sh @@ -93,7 +93,7 @@ msg_info "Generating MintHCM configuration file (configMint4)" set -a source /var/www/script/.env set +a -php /var/www/script/generate_config.php || msg_error "Failed to execute generate_config.php" +php /var/www/script/generate_config.php msg_ok "Generated MintHCM configuration file (configMint4)" msg_info "Starting MintHCM installation..." From b49ba6163f314cdce680a2de6870171bf76f114f Mon Sep 17 00:00:00 2001 From: MintHCM <51930758+MintHCM-admin@users.noreply.github.com> Date: Tue, 23 Dec 2025 09:01:45 +0100 Subject: [PATCH 17/27] Update install/minthcm-install.sh Co-authored-by: Tobias <96661824+CrazyWolf13@users.noreply.github.com> --- install/minthcm-install.sh | 2 -- 1 file changed, 2 deletions(-) diff --git a/install/minthcm-install.sh b/install/minthcm-install.sh index 6b727e1f0..be34fab5d 100644 --- a/install/minthcm-install.sh +++ b/install/minthcm-install.sh @@ -53,9 +53,7 @@ $STD apt install -y elasticsearch echo "-Xms2g" >>/etc/elasticsearch/jvm.options echo "-Xmx2g" >>/etc/elasticsearch/jvm.options - $STD /usr/share/elasticsearch/bin/elasticsearch-plugin install ingest-attachment -b - systemctl enable -q --now elasticsearch msg_ok "Set up Elasticsearch" From 46c4adfa67828d692e4be501c35134c18919b397 Mon Sep 17 00:00:00 2001 From: MintHCM <51930758+MintHCM-admin@users.noreply.github.com> Date: Tue, 23 Dec 2025 09:04:51 +0100 Subject: [PATCH 18/27] Update install/minthcm-install.sh Co-authored-by: Tobias <96661824+CrazyWolf13@users.noreply.github.com> --- install/minthcm-install.sh | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/install/minthcm-install.sh b/install/minthcm-install.sh index be34fab5d..ec7e8d2b5 100644 --- a/install/minthcm-install.sh +++ b/install/minthcm-install.sh @@ -23,20 +23,17 @@ msg_ok "Enabled Apache modules (rewrite, headers)" fetch_and_deploy_gh_release "MintHCM" "minthcm/minthcm" "tarball" "latest" "/var/www/MintHCM" -msg_info "Configuring PHP and Apache2 for MintHCM" +msg_info "Configuring MintHCM" mkdir -p /etc/php/8.2/mods-available cp /var/www/MintHCM/docker/config/000-default.conf /etc/apache2/sites-available/000-default.conf cp /var/www/MintHCM/docker/config/php-minthcm.ini /etc/php/8.2/mods-available/php-minthcm.ini mkdir -p "/etc/php/8.2/cli/conf.d" "/etc/php/8.2/apache2/conf.d" ln -s "/etc/php/8.2/mods-available/php-minthcm.ini" "/etc/php/8.2/cli/conf.d/20-minthcm.ini" ln -s "/etc/php/8.2/mods-available/php-minthcm.ini" "/etc/php/8.2/apache2/conf.d/20-minthcm.ini" -msg_ok "Configured PHP and Apache2 for MintHCM" - -msg_info "Setting ownership and permissions for MintHCM directory" chown -R www-data:www-data /var/www/MintHCM find /var/www/MintHCM -type d -exec chmod 755 {} \; find /var/www/MintHCM -type f -exec chmod 644 {} \; -msg_ok "Set up ownership and permissions for MintHCM directory" +msg_ok "Configured MintHCM" msg_info "Restarting Apache2" $STD systemctl restart apache2 From 9e2c7a3a0e95ed53aa68e3ed2600bdc5f294849c Mon Sep 17 00:00:00 2001 From: MintHCM-admin Date: Tue, 23 Dec 2025 09:05:20 +0100 Subject: [PATCH 19/27] move mariadbsetup --- install/minthcm-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/minthcm-install.sh b/install/minthcm-install.sh index e8cd964a4..756cfd31b 100644 --- a/install/minthcm-install.sh +++ b/install/minthcm-install.sh @@ -59,8 +59,8 @@ $STD /usr/share/elasticsearch/bin/elasticsearch-plugin install ingest-attachment systemctl enable -q --now elasticsearch msg_ok "Set up Elasticsearch" -msg_info "Setting up MariaDB" setup_mariadb +msg_info "Setting up MariaDB" $STD mariadb -u root -e "SET GLOBAL sql_mode='STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION'"; msg_ok "Set up MariaDB" From 650e7bfb194c304415a9cbd65ec78e7dd038303d Mon Sep 17 00:00:00 2001 From: MintHCM-admin Date: Tue, 23 Dec 2025 09:14:22 +0100 Subject: [PATCH 20/27] php version variable --- install/minthcm-install.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/install/minthcm-install.sh b/install/minthcm-install.sh index a65b959b2..90531d06e 100644 --- a/install/minthcm-install.sh +++ b/install/minthcm-install.sh @@ -24,12 +24,12 @@ msg_ok "Enabled Apache modules (rewrite, headers)" fetch_and_deploy_gh_release "MintHCM" "minthcm/minthcm" "tarball" "latest" "/var/www/MintHCM" msg_info "Configuring MintHCM" -mkdir -p /etc/php/8.2/mods-available +mkdir -p /etc/php/${PHP_VERSION}/mods-available cp /var/www/MintHCM/docker/config/000-default.conf /etc/apache2/sites-available/000-default.conf -cp /var/www/MintHCM/docker/config/php-minthcm.ini /etc/php/8.2/mods-available/php-minthcm.ini -mkdir -p "/etc/php/8.2/cli/conf.d" "/etc/php/8.2/apache2/conf.d" -ln -s "/etc/php/8.2/mods-available/php-minthcm.ini" "/etc/php/8.2/cli/conf.d/20-minthcm.ini" -ln -s "/etc/php/8.2/mods-available/php-minthcm.ini" "/etc/php/8.2/apache2/conf.d/20-minthcm.ini" +cp /var/www/MintHCM/docker/config/php-minthcm.ini /etc/php/${PHP_VERSION}/mods-available/php-minthcm.ini +mkdir -p "/etc/php/${PHP_VERSION}/cli/conf.d" "/etc/php/${PHP_VERSION}/apache2/conf.d" +ln -s "/etc/php/${PHP_VERSION}/mods-available/php-minthcm.ini" "/etc/php/${PHP_VERSION}/cli/conf.d/20-minthcm.ini" +ln -s "/etc/php/${PHP_VERSION}/mods-available/php-minthcm.ini" "/etc/php/${PHP_VERSION}/apache2/conf.d/20-minthcm.ini" chown -R www-data:www-data /var/www/MintHCM find /var/www/MintHCM -type d -exec chmod 755 {} \; find /var/www/MintHCM -type f -exec chmod 644 {} \; From db5ca9ee255521411ea91777d35a73b82ee1e210 Mon Sep 17 00:00:00 2001 From: MintHCM-admin Date: Tue, 23 Dec 2025 09:29:42 +0100 Subject: [PATCH 21/27] move few config lines --- install/minthcm-install.sh | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/install/minthcm-install.sh b/install/minthcm-install.sh index 90531d06e..3ddceaba9 100644 --- a/install/minthcm-install.sh +++ b/install/minthcm-install.sh @@ -33,6 +33,10 @@ ln -s "/etc/php/${PHP_VERSION}/mods-available/php-minthcm.ini" "/etc/php/${PHP_V chown -R www-data:www-data /var/www/MintHCM find /var/www/MintHCM -type d -exec chmod 755 {} \; find /var/www/MintHCM -type f -exec chmod 644 {} \; +mkdir -p /var/www/script +cp /var/www/MintHCM/docker/script/generate_config.php /var/www/script/generate_config.php +cp /var/www/MintHCM/docker/.env /var/www/script/.env +chown -R www-data:www-data /var/www/script msg_ok "Configured MintHCM" msg_info "Restarting Apache2" @@ -60,24 +64,15 @@ $STD mariadb -u root -e "SET GLOBAL sql_mode='STRICT_TRANS_TABLES,NO_ZERO_IN_DAT msg_ok "Set up MariaDB" msg_info "Configuring database for MintHCM" - DB_PASS=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | head -c13) $STD mariadb -u root -e "CREATE USER 'minthcm'@'localhost' IDENTIFIED BY '${DB_PASS}';" $STD mariadb -u root -e "GRANT ALL ON *.* TO 'minthcm'@'localhost'; FLUSH PRIVILEGES;" msg_ok "Configured MariaDB for MintHCM" -msg_info "Downloading generate_config.php script" -mkdir -p /var/www/script -cp /var/www/MintHCM/docker/script/generate_config.php /var/www/script/generate_config.php -chown -R www-data:www-data /var/www/script -msg_ok "Downloading generate_config.php script" - -cp /var/www/MintHCM/docker/.env /var/www/script/.env sed -i 's/^DB_HOST=.*/DB_HOST=localhost/' /var/www/script/.env sed -i 's/^DB_USER=.*/DB_USER=minthcm/' /var/www/script/.env sed -i "s/^DB_PASS=.*/DB_PASS=${DB_PASS}/" /var/www/script/.env sed -i 's/^ELASTICSEARCH_HOST=.*/ELASTICSEARCH_HOST=localhost/' /var/www/script/.env - { echo "MintHCM DB Credentials" echo "MariaDB User: minthcm" From 9693c9c3e88094fff25baab9f91406c5915d31fc Mon Sep 17 00:00:00 2001 From: MintHCM <51930758+MintHCM-admin@users.noreply.github.com> Date: Wed, 7 Jan 2026 10:10:09 +0100 Subject: [PATCH 22/27] Update install/minthcm-install.sh Co-authored-by: Tobias <96661824+CrazyWolf13@users.noreply.github.com> --- install/minthcm-install.sh | 2 -- 1 file changed, 2 deletions(-) diff --git a/install/minthcm-install.sh b/install/minthcm-install.sh index 3ddceaba9..ff93662e4 100644 --- a/install/minthcm-install.sh +++ b/install/minthcm-install.sh @@ -95,8 +95,6 @@ printf "* * * * * cd /var/www/MintHCM/legacy; php -f cron.php > service cron start rm -f /var/www/MintHCM/configMint4 - - motd_ssh customize cleanup_lxc From 5eec7b6a3feae411cd0962b01c90ebae7cc1cf47 Mon Sep 17 00:00:00 2001 From: MintHCM <51930758+MintHCM-admin@users.noreply.github.com> Date: Wed, 7 Jan 2026 10:10:22 +0100 Subject: [PATCH 23/27] Update install/minthcm-install.sh Co-authored-by: Tobias <96661824+CrazyWolf13@users.noreply.github.com> --- install/minthcm-install.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/install/minthcm-install.sh b/install/minthcm-install.sh index ff93662e4..5d27c613f 100644 --- a/install/minthcm-install.sh +++ b/install/minthcm-install.sh @@ -51,7 +51,6 @@ setup_deb822_repo \ "stable" \ "main" $STD apt install -y elasticsearch - echo "-Xms2g" >>/etc/elasticsearch/jvm.options echo "-Xmx2g" >>/etc/elasticsearch/jvm.options $STD /usr/share/elasticsearch/bin/elasticsearch-plugin install ingest-attachment -b From 52ee636f29063fffd3c3e245ad23094e7fcd98ed Mon Sep 17 00:00:00 2001 From: MintHCM <51930758+MintHCM-admin@users.noreply.github.com> Date: Wed, 7 Jan 2026 10:10:52 +0100 Subject: [PATCH 24/27] Update install/minthcm-install.sh Co-authored-by: Tobias <96661824+CrazyWolf13@users.noreply.github.com> --- install/minthcm-install.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/install/minthcm-install.sh b/install/minthcm-install.sh index 5d27c613f..8a2342187 100644 --- a/install/minthcm-install.sh +++ b/install/minthcm-install.sh @@ -62,16 +62,15 @@ msg_info "Setting up MariaDB" $STD mariadb -u root -e "SET GLOBAL sql_mode='STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION'"; msg_ok "Set up MariaDB" -msg_info "Configuring database for MintHCM" +msg_info "Configuring Database" DB_PASS=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | head -c13) $STD mariadb -u root -e "CREATE USER 'minthcm'@'localhost' IDENTIFIED BY '${DB_PASS}';" $STD mariadb -u root -e "GRANT ALL ON *.* TO 'minthcm'@'localhost'; FLUSH PRIVILEGES;" -msg_ok "Configured MariaDB for MintHCM" - sed -i 's/^DB_HOST=.*/DB_HOST=localhost/' /var/www/script/.env sed -i 's/^DB_USER=.*/DB_USER=minthcm/' /var/www/script/.env sed -i "s/^DB_PASS=.*/DB_PASS=${DB_PASS}/" /var/www/script/.env sed -i 's/^ELASTICSEARCH_HOST=.*/ELASTICSEARCH_HOST=localhost/' /var/www/script/.env +msg_ok "Configured MariaDB" { echo "MintHCM DB Credentials" echo "MariaDB User: minthcm" From 4b364470899985cec4c209020dd9a8bbe2746b90 Mon Sep 17 00:00:00 2001 From: MintHCM <51930758+MintHCM-admin@users.noreply.github.com> Date: Wed, 7 Jan 2026 10:11:21 +0100 Subject: [PATCH 25/27] Update install/minthcm-install.sh Co-authored-by: Tobias <96661824+CrazyWolf13@users.noreply.github.com> --- install/minthcm-install.sh | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/install/minthcm-install.sh b/install/minthcm-install.sh index 8a2342187..a6eed1129 100644 --- a/install/minthcm-install.sh +++ b/install/minthcm-install.sh @@ -77,21 +77,19 @@ msg_ok "Configured MariaDB" echo "MariaDB Password: $DB_PASS" } >>~/minthcm.creds -msg_info "Generating MintHCM configuration file (configMint4)" +msg_info "Generating configuration file" set -a source /var/www/script/.env set +a php /var/www/script/generate_config.php -msg_ok "Generated MintHCM configuration file (configMint4)" +msg_ok "Generated configuration file" -msg_info "Starting MintHCM installation..." +msg_info "Installing MintHCM" cd /var/www/MintHCM && su -s /bin/bash -c 'php /var/www/MintHCM/MintCLI install < /var/www/MintHCM/configMint4' www-data - -msg_ok "MintHCM installation completed!" -msg_info "Configuring cron for MintHCM" printf "* * * * * cd /var/www/MintHCM/legacy; php -f cron.php > /dev/null 2>&1\n" > /var/spool/cron/crontabs/www-data service cron start rm -f /var/www/MintHCM/configMint4 +msg_ok "Installed MintHCM" motd_ssh customize From a1eabc37118eac77ef065602b437b7e06c9dcdc0 Mon Sep 17 00:00:00 2001 From: MintHCM-admin Date: Wed, 7 Jan 2026 12:50:59 +0100 Subject: [PATCH 26/27] logo change --- frontend/public/json/minthcm.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/public/json/minthcm.json b/frontend/public/json/minthcm.json index a901a7cb3..8658ac9ca 100644 --- a/frontend/public/json/minthcm.json +++ b/frontend/public/json/minthcm.json @@ -12,7 +12,7 @@ "documentation": "https://wiki.minthcm.org/", "config_path": "/var/www/MintHCM", "website": "https://minthcm.org/", - "logo": "https://minthcm.org/wp-content/uploads/2021/03/minthcm-logo.svg", + "logo": "https://cdn.jsdelivr.net/gh/selfhst/icons@main/svg/minthcm.svg", "description": "MintCHM is a free and open-source tool for Human Capital Management. Main features: recruitment, time management, onboarding & offboarding, calendar, leave management, resources booking, travel & expenses, workplace management, analytics, roles & permissions management, job descriptions, employer branding, employee profiles, competences & skills, employment history, employee evaluations, iOS & Android mobile apps. Mint based on two popular, well-known business applications: SugarCRM Community Edition and SuiteCRM. This is why we often say that MintHCM is CRM reinvented.", "install_methods": [ { From 77096ad62bdb3405cac16b800083977ea2eceac9 Mon Sep 17 00:00:00 2001 From: MintHCM-admin Date: Thu, 8 Jan 2026 10:18:40 +0100 Subject: [PATCH 27/27] shorten description and change to webp --- frontend/public/json/minthcm.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/public/json/minthcm.json b/frontend/public/json/minthcm.json index 8658ac9ca..dcc1527ef 100644 --- a/frontend/public/json/minthcm.json +++ b/frontend/public/json/minthcm.json @@ -12,8 +12,8 @@ "documentation": "https://wiki.minthcm.org/", "config_path": "/var/www/MintHCM", "website": "https://minthcm.org/", - "logo": "https://cdn.jsdelivr.net/gh/selfhst/icons@main/svg/minthcm.svg", - "description": "MintCHM is a free and open-source tool for Human Capital Management. Main features: recruitment, time management, onboarding & offboarding, calendar, leave management, resources booking, travel & expenses, workplace management, analytics, roles & permissions management, job descriptions, employer branding, employee profiles, competences & skills, employment history, employee evaluations, iOS & Android mobile apps. Mint based on two popular, well-known business applications: SugarCRM Community Edition and SuiteCRM. This is why we often say that MintHCM is CRM reinvented.", + "logo": "https://cdn.jsdelivr.net/gh/selfhst/icons@main/webp/minthcm.webp", + "description": "MintCHM is a free and open-source tool for Human Capital Management. Main features: recruitment, time management, onboarding & offboarding, calendar, leave management, resources booking, travel & expenses, workplace management, analytics, roles & permissions management, job descriptions, employer branding, employee profiles, competences & skills, employment history, employee evaluations.", "install_methods": [ { "type": "default",