1 Star 0 Fork 0

ShiningRay/dokku-mysql

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
pre-start 879 Bytes
一键复制 编辑 原始数据 按行查看 历史
#!/usr/bin/env bash
source "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/config"
source "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/common-functions"
source "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/functions"
set -eo pipefail
[[ $DOKKU_TRACE ]] && set -x
plugin-pre-start() {
declare APP="$1"
local status
for SERVICE in $(fn-services-list false); do
if ! in_links_file "$SERVICE" "$APP"; then
continue
fi
status="$(service_status "$SERVICE")"
if [[ "$status" == "running" ]]; then
continue
fi
if [[ "$status" == "restarting" ]]; then
dokku_log_warn "$PLUGIN_SERVICE service $SERVICE is restarting and may cause issues with linked app $APP"
continue
fi
dokku_log_warn "$PLUGIN_SERVICE service $SERVICE is not running, issuing service start"
service_start "$SERVICE"
done
}
plugin-pre-start "$@"
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/ShiningRay/dokku-mysql.git
git@gitee.com:ShiningRay/dokku-mysql.git
ShiningRay
dokku-mysql
dokku-mysql
master

搜索帮助