blob: e50eecf661c0c1ec1cad057961828ce250bf1562 (
plain)
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
|
# Register functions
post_install() {
start=
if systemctl -q is-active mysqld; then
echo Stopping mysqld... >&2
start=1
systemctl stop mysqld
fi
echo Registering UDF library... >&2
mysqld -u mysql --bootstrap < /usr/share/udf-infusion/load.sql 2> /dev/null
if test -n "$start"; then
echo Starting mysqld... >&2
systemctl start mysqld
fi
}
post_upgrade() {
post_install "$@"
}
# Unregister functions
pre_remove() {
start=
if systemctl -q is-active mysqld; then
echo Stopping mysqld... >&2
start=1
systemctl stop mysqld
fi
echo Unregistering UDF library... >&2
mysqld -u mysql --bootstrap < /usr/share/udf-infusion/unload.sql 2> /dev/null
if test -n "$start"; then
echo Starting mysqld... >&2
systemctl start mysqld
fi
}
pre_upgrade() {
pre_remove "$@"
}
|