diff options
author | Morris Jobke | 2016-02-15 17:13:51 +0100 |
---|---|---|
committer | Morris Jobke | 2016-02-15 23:55:18 +0100 |
commit | 87eec064d569e3a1b6f42dfcbca5502d38e51601 (patch) | |
tree | 47cc17957cfb1968be1bcc4073996be3deed0ac4 /dokku.install | |
parent | 659e3741cfd87f7f829c3ed29def4ccdd9a7ba12 (diff) | |
download | aur-87eec064d569e3a1b6f42dfcbca5502d38e51601.tar.gz |
Update dokku to 0.4.13
Diffstat (limited to 'dokku.install')
-rw-r--r-- | dokku.install | 28 |
1 files changed, 24 insertions, 4 deletions
diff --git a/dokku.install b/dokku.install index e6a9017c99ae..2467599b7240 100644 --- a/dokku.install +++ b/dokku.install @@ -3,18 +3,24 @@ post_install() { getent group dokku >/dev/null || groupadd --system dokku + # same as: sshcommand create dokku /usr/bin/dokku getent passwd dokku >/dev/null || useradd --system \ --gid dokku \ --shell /usr/bin/dokku \ --home-dir /var/dokku/ \ - -m \ + -m \ dokku chown dokku:dokku /var/dokku/ mkdir /var/dokku/.ssh/ - chown dokku:dokku /var/dokku/.ssh/ - gpasswd -a dokku docker + touch /var/dokku/.ssh/authorized_keys + chown -R dokku:dokku /var/dokku/.ssh/ + gpasswd -a dokku docker > /dev/null + + echo "$1" | cut -d "-" -f 1 > /var/dokku/VERSION + + chown -R dokku:dokku /var/lib/dokku/ if [ ! -f "/var/dokku/HOSTNAME" ]; then hostname -f > "/var/dokku/HOSTNAME" @@ -23,9 +29,13 @@ post_install() { echo "%dokku ALL=(ALL) NOPASSWD:/usr/bin/systemctl reload nginx, /usr/sbin/nginx -t" > /etc/sudoers.d/dokku-nginx + mkdir -p /etc/nginx/conf.d + + dokku plugin:install --core + echo " Please add your ssh pubkey like: - $ cat ~/.ssh/id_rsa.pub | sudo sshcommand acl-add dokku comment + $ cat ~/.ssh/id_rsa.pub | sudo sshcommand acl-add dokku 'local key' To enable nginx autoconfiguration, add to your /etc/nginx/nginx.conf in http section: include /etc/nginx/conf.d/*.conf; @@ -36,3 +46,13 @@ pre_remove() { userdel dokku &>/dev/null || true groupdel dokku &>/dev/null || true } + +post_remove() { + rm -f /etc/init/dokku-installer.conf + rm -f /etc/init/dokku-redeploy.conf + rm -f /etc/systemd/system/dokku-installer.conf + rm -f /etc/systemd/system/dokku-redeploy.service + rm -f /etc/update-motd.d/99-dokku + rm -rf /var/dokku + rm -rf /etc/nginx/conf.d/dokku.conf +} |