blob: da8cd7b58c7e57244447ac92e9619180f52f5cab (
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
|
ETCD_DATA_DIR="/var/lib/etcd"
pre_upgrade() {
cat << EOF
To upgrade an existing etcd deployment to 2.2, you must be running 2.1.
If you’re running a version of etcd before 2.1, you must upgrade to 2.1 before upgrading to 2.2.
And you should, probably, read the following:
/usr/share/doc/etcd/04_to_2_snapshot_migration.md
/usr/share/doc/etcd/upgrade_2_1.md
/usr/share/doc/etcd/upgrade_2_2.md
EOF
}
post_install() {
mkdir -p "${ETCD_DATA_DIR}"
# create an etcd user
id -u etcd &>/dev/null || useradd -r -M -U -d /dev/null -s /bin/nologin etcd
chown -R etcd:etcd "${ETCD_DATA_DIR}"
}
post_upgrade() {
post_install
}
|