summarylogtreecommitdiffstats
path: root/etcd.install
blob: 3e08d8504892a843eab84ff4fb7baf454cdb52e5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
ETCD_DATA_DIR="/var/lib/etcd"

pre_upgrade() {
cat << EOF
        Upgrading from 2.3 to 3.0:
                /usr/share/doc/etcd/upgrades/upgrade_3_0.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
}