summarylogtreecommitdiffstats
path: root/etcd.install
diff options
context:
space:
mode:
authorAndrey Kojevnikov2015-06-28 03:46:26 +1000
committerAndrey Kojevnikov2015-06-28 03:46:26 +1000
commit3748f65da75b4f28321b388a3b025fe0b1507dbd (patch)
treec174911623b06979099c50f3b46ac31a6b11aec1 /etcd.install
downloadaur-3748f65da75b4f28321b388a3b025fe0b1507dbd.tar.gz
aur4
Diffstat (limited to 'etcd.install')
-rw-r--r--etcd.install14
1 files changed, 14 insertions, 0 deletions
diff --git a/etcd.install b/etcd.install
new file mode 100644
index 000000000000..1e3696cc88b6
--- /dev/null
+++ b/etcd.install
@@ -0,0 +1,14 @@
+ETCD_DATA_DIR="/var/lib/etcd/"
+
+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
+}