-
Notifications
You must be signed in to change notification settings - Fork 2
/
customize
executable file
·39 lines (28 loc) · 983 Bytes
/
customize
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/usr/bin/bash
#
# Put customizations to your image in this file.
PATH=/opt/local/gnu/bin:/opt/local/bin:/opt/local/sbin:/usr/bin:/usr/sbin
WEB_VERSION=1.11.67
WEB_URL="https://github.com/vector-im/element-web/releases/download/v${WEB_VERSION}/element-v${WEB_VERSION}.tar.gz"
# Munin plugins
MUNIN_PLUGINS="
"
# Exit if any commands fail
set -o errexit
echo "* Remove used pgsql stuff from base"
rm -rf /var/pgsql/*
echo "* Download and extract element web interface"
mkdir -p /var/www
curl -L "${WEB_URL}" | gtar xz -C /var/www --strip-components=1
echo "* Fix home permissions for web-root"
chown -R www:www /var/www
echo "* Matrix Bridge installation"
echo "** irc (heisenbridge)"
/opt/core/bin/install_matrix_app_service heisenbridge 1.14.6
echo "* Activate munin plugins"
/opt/core/bin/munin-node-plugins ${MUNIN_PLUGINS}
echo "* Cleanup home/admin because of delegate dataset usage"
rm -rf /home/admin/.[^.]*
echo "* Cleaning up"
rm -rf /root/*
sm-prepare-image -y