diff options
author | Martin -nexus- Mlynář | 2015-07-21 23:50:13 +0200 |
---|---|---|
committer | Martin -nexus- Mlynář | 2015-07-22 00:22:26 +0200 |
commit | 71d4153881ea0520d9e5d52806d6fe69975f35c9 (patch) | |
tree | 5e01f5e18b86b551227e834fc0ad1d99b56544f8 /dokku.install | |
download | aur-71d4153881ea0520d9e5d52806d6fe69975f35c9.tar.gz |
initial package
Diffstat (limited to 'dokku.install')
-rw-r--r-- | dokku.install | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/dokku.install b/dokku.install new file mode 100644 index 000000000000..3fa008e9d726 --- /dev/null +++ b/dokku.install @@ -0,0 +1,33 @@ +#!/bin/sh +post_install() { + getent group dokku >/dev/null || + groupadd --system dokku + + getent passwd dokku >/dev/null || + useradd --system \ + --gid dokku \ + --shell /usr/bin/dokku \ + --home-dir /var/dokku/ \ + -m \ + dokku + + chown dokku:dokku /var/dokku/ + mkdir /var/dokku/.ssh/ + chown dokku:dokku /var/dokku/.ssh/ + gpasswd -a dokku docker + + if [ ! -f "/var/dokku/HOSTNAME" ]; then + hostname -f > "/var/dokku/HOSTNAME" + chown dokku:dokku "/var/dokku/HOSTNAME" + fi + + echo " + Please add your ssh pubkey like: + $ cat ~/.ssh/id_rsa.pub | sudo sshcommand acl-add dokku comment +" +} + +pre_remove() { + userdel dokku &>/dev/null || true + groupdel dokku &>/dev/null || true +} |