Skip to content

Commit cf7d325

Browse files
authored
Refactor (#9805)
1 parent 3be34bd commit cf7d325

File tree

3 files changed

+12
-10
lines changed

3 files changed

+12
-10
lines changed

ct/zammad.sh

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,21 +27,22 @@ function update_script() {
2727
msg_error "No ${APP} Installation Found!"
2828
exit
2929
fi
30+
3031
msg_info "Stopping Service"
3132
systemctl stop zammad
3233
msg_ok "Stopped Service"
3334

34-
msg_info "Updating ${APP}"
35+
msg_info "Updating Zammad"
3536
$STD apt update
3637
$STD apt-mark hold zammad
37-
$STD apt -y upgrade
38+
$STD apt upgrade -y
3839
$STD apt-mark unhold zammad
39-
$STD apt -y upgrade
40-
msg_ok "Updated ${APP}"
40+
$STD apt upgrade -y
41+
msg_ok "Updated Zammad"
4142

4243
msg_info "Starting Service"
4344
systemctl start zammad
44-
msg_ok "Updated ${APP} LXC"
45+
msg_ok "Started Service"
4546
msg_ok "Updated successfully!"
4647
exit
4748
}

frontend/public/json/zammad.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"interface_port": null,
1212
"documentation": "https://docs.zammad.org/en/latest/",
1313
"website": "https://zammad.org/",
14-
"logo": "https://cdn.jsdelivr.net/gh/selfhst/icons@master/webp/zammad.webp",
14+
"logo": "https://cdn.jsdelivr.net/gh/selfhst/icons@main/webp/zammad.webp",
1515
"config_path": "/etc/nginx/sites-available/zammad.conf",
1616
"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).",
1717
"install_methods": [

install/zammad-install.sh

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,16 @@ $STD apt install -y \
2020
apt-transport-https
2121
msg_ok "Installed Dependencies"
2222

23+
import_local_ip
24+
2325
msg_info "Setting up Elasticsearch"
2426
setup_deb822_repo \
2527
"elasticsearch" \
2628
"https://artifacts.elastic.co/GPG-KEY-elasticsearch" \
2729
"https://artifacts.elastic.co/packages/7.x/apt" \
2830
"stable" \
2931
"main"
30-
$STD apt -y install elasticsearch
32+
$STD apt install -y elasticsearch
3133
echo "-Xms2g" >>/etc/elasticsearch/jvm.options
3234
echo "-Xmx2g" >>/etc/elasticsearch/jvm.options
3335
$STD /usr/share/elasticsearch/bin/elasticsearch-plugin install ingest-attachment -b
@@ -42,15 +44,14 @@ setup_deb822_repo \
4244
"https://dl.packager.io/srv/deb/zammad/zammad/stable/debian" \
4345
"$(get_os_info version_id)" \
4446
"main"
45-
$STD apt -y install zammad
47+
$STD apt install -y zammad
4648
$STD zammad run rails r "Setting.set('es_url', 'http://localhost:9200')"
4749
$STD zammad run rake zammad:searchindex:rebuild
4850
msg_ok "Installed Zammad"
4951

5052
msg_info "Setup Services"
5153
cp /opt/zammad/contrib/nginx/zammad.conf /etc/nginx/sites-available/zammad.conf
52-
IPADDRESS=$(hostname -I | awk '{print $1}')
53-
sed -i "s/server_name localhost;/server_name $IPADDRESS;/g" /etc/nginx/sites-available/zammad.conf
54+
sed -i "s/server_name localhost;/server_name $LOCAL_IP;/g" /etc/nginx/sites-available/zammad.conf
5455
$STD systemctl reload nginx
5556
msg_ok "Created Service"
5657

0 commit comments

Comments
 (0)