summarylogtreecommitdiffstats
path: root/etcd.install
diff options
context:
space:
mode:
Diffstat (limited to 'etcd.install')
-rw-r--r--etcd.install21
1 files changed, 21 insertions, 0 deletions
diff --git a/etcd.install b/etcd.install
new file mode 100644
index 000000000000..3e08d8504892
--- /dev/null
+++ b/etcd.install
@@ -0,0 +1,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
+}