From cf7d32548f40474b4255a948b47ca64c7000f7cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Slavi=C5=A1a=20Are=C5=BEina?= <58952836+tremor021@users.noreply.github.com> Date: Tue, 9 Dec 2025 15:58:13 +0100 Subject: [PATCH] Refactor (#9805) --- ct/zammad.sh | 11 ++++++----- frontend/public/json/zammad.json | 2 +- install/zammad-install.sh | 9 +++++---- 3 files changed, 12 insertions(+), 10 deletions(-) diff --git a/ct/zammad.sh b/ct/zammad.sh index 108a6c1d7..a2a439330 100644 --- a/ct/zammad.sh +++ b/ct/zammad.sh @@ -27,21 +27,22 @@ function update_script() { msg_error "No ${APP} Installation Found!" exit fi + msg_info "Stopping Service" systemctl stop zammad msg_ok "Stopped Service" - msg_info "Updating ${APP}" + msg_info "Updating Zammad" $STD apt update $STD apt-mark hold zammad - $STD apt -y upgrade + $STD apt upgrade -y $STD apt-mark unhold zammad - $STD apt -y upgrade - msg_ok "Updated ${APP}" + $STD apt upgrade -y + msg_ok "Updated Zammad" msg_info "Starting Service" systemctl start zammad - msg_ok "Updated ${APP} LXC" + msg_ok "Started Service" msg_ok "Updated successfully!" exit } diff --git a/frontend/public/json/zammad.json b/frontend/public/json/zammad.json index a892db7cc..c034faa73 100644 --- a/frontend/public/json/zammad.json +++ b/frontend/public/json/zammad.json @@ -11,7 +11,7 @@ "interface_port": null, "documentation": "https://docs.zammad.org/en/latest/", "website": "https://zammad.org/", - "logo": "https://cdn.jsdelivr.net/gh/selfhst/icons@master/webp/zammad.webp", + "logo": "https://cdn.jsdelivr.net/gh/selfhst/icons@main/webp/zammad.webp", "config_path": "/etc/nginx/sites-available/zammad.conf", "description": "Zammad is a web based open source helpdesk/customer support system with many features to manage customer communication via several channels like telephone, facebook, twitter, chat and emails. It is distributed under version 3 of the GNU AFFERO General Public License (GNU AGPLv3).", "install_methods": [ diff --git a/install/zammad-install.sh b/install/zammad-install.sh index 6c291a247..39745b93e 100644 --- a/install/zammad-install.sh +++ b/install/zammad-install.sh @@ -20,6 +20,8 @@ $STD apt install -y \ apt-transport-https msg_ok "Installed Dependencies" +import_local_ip + msg_info "Setting up Elasticsearch" setup_deb822_repo \ "elasticsearch" \ @@ -27,7 +29,7 @@ setup_deb822_repo \ "https://artifacts.elastic.co/packages/7.x/apt" \ "stable" \ "main" -$STD apt -y 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 @@ -42,15 +44,14 @@ setup_deb822_repo \ "https://dl.packager.io/srv/deb/zammad/zammad/stable/debian" \ "$(get_os_info version_id)" \ "main" -$STD apt -y install zammad +$STD apt install -y zammad $STD zammad run rails r "Setting.set('es_url', 'http://localhost:9200')" $STD zammad run rake zammad:searchindex:rebuild msg_ok "Installed Zammad" msg_info "Setup Services" cp /opt/zammad/contrib/nginx/zammad.conf /etc/nginx/sites-available/zammad.conf -IPADDRESS=$(hostname -I | awk '{print $1}') -sed -i "s/server_name localhost;/server_name $IPADDRESS;/g" /etc/nginx/sites-available/zammad.conf +sed -i "s/server_name localhost;/server_name $LOCAL_IP;/g" /etc/nginx/sites-available/zammad.conf $STD systemctl reload nginx msg_ok "Created Service"