mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2025-12-10 03:59:39 -06:00
Refactor (#9805)
This commit is contained in:
parent
3be34bdac8
commit
cf7d32548f
11
ct/zammad.sh
11
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
|
||||
}
|
||||
|
||||
@ -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": [
|
||||
|
||||
@ -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"
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user