mirror of
https://github.com/dokku/dokku.git
synced 2025-12-29 00:25:08 +01:00
We had an issue with third party plugins installing things via apt while already installing dokku itself via apt. To resolve this, `plugins-install` and `plugins-install-dependencies` now can take a `--core` flag allowing to execute the install hook only on core plugins and not on third party plugins. Another feature with this modification is the ability to disable/enable plugins. Two new commands now exist: * `plugins:enable <name>` to enable a previously disabled plugin * `plugins:disable <name>` to disable an installed plugin. This won’t work on core plugins.
56 lines
1.3 KiB
Bash
Executable File
56 lines
1.3 KiB
Bash
Executable File
#!/bin/sh
|
|
set -e
|
|
|
|
. /usr/share/debconf/confmodule
|
|
|
|
readonly DOKKU_ROOT="${DOKKU_ROOT:-/home/dokku}"
|
|
|
|
case "$1" in
|
|
abort-upgrade|abort-remove|abort-deconfigure)
|
|
;;
|
|
|
|
configure)
|
|
mandb
|
|
[ ! -x /usr/bin/docker.io ] || ln -sf /usr/bin/docker.io /usr/local/bin/docker
|
|
modprobe aufs || echo "WARNING: Restart server to finish installing dokku!"
|
|
sshcommand create dokku /usr/local/bin/dokku
|
|
egrep -i "^docker" /etc/group || groupadd docker
|
|
usermod -aG docker dokku
|
|
dokku plugins-install --core
|
|
rm -f /home/dokku/VERSION
|
|
cp /var/lib/dokku/STABLE_VERSION /home/dokku/VERSION
|
|
|
|
if [ -f /etc/init/dokku-installer.conf ] && service dokku-installer status 2> /dev/null | grep waiting; then
|
|
sudo service dokku-installer start
|
|
fi
|
|
|
|
db_get "dokku/web_config"
|
|
if [ "$RET" = "true" ]; then
|
|
exit 0
|
|
fi
|
|
|
|
db_get "dokku/vhost_enable"
|
|
if [ "$RET" = "true" ]; then
|
|
db_get "dokku/hostname"
|
|
echo "$RET" > "${DOKKU_ROOT}/VHOST"
|
|
else
|
|
rm -f "${DOKKU_ROOT}/VHOST"
|
|
fi
|
|
|
|
db_get "dokku/hostname"
|
|
echo "$RET" > "${DOKKU_ROOT}/HOSTNAME"
|
|
|
|
if [ -z "${DEBCONF_RECONFIGURE}" ]; then
|
|
db_get "dokku/key_file"
|
|
sshcommand acl-add dokku default < "$RET"
|
|
fi
|
|
;;
|
|
|
|
*)
|
|
echo "postinst called with unknown argument \`$1'" >&2
|
|
exit 1
|
|
;;
|
|
esac
|
|
|
|
exit 0
|