mirror of
https://github.com/dokku/dokku.git
synced 2025-12-29 00:25:08 +01:00
Merge pull request #4890 from dokku/drop-which
Drop which in favor of command -v
This commit is contained in:
@@ -6,7 +6,7 @@ if [[ ! -f "$DOKKU_ROOT/VHOST" ]]; then
|
||||
[[ $(dig +short "$(hostname -f)") ]] && hostname -f >"$DOKKU_ROOT/VHOST"
|
||||
fi
|
||||
|
||||
dokku_path="$(which dokku)"
|
||||
dokku_path="$(command -v dokku)"
|
||||
|
||||
# temporary hack for https://github.com/dokku/dokku/issues/82
|
||||
# redeploys all apps after a reboot
|
||||
|
||||
@@ -7,7 +7,7 @@ nginx_needs_upgrade() {
|
||||
local MAJOR_VERSION MINOR_VERSION
|
||||
local NEEDS_UPGRADE=true
|
||||
|
||||
if ! which nginx >/dev/null 2>&1; then
|
||||
if ! command -v nginx &>/dev/null; then
|
||||
echo $NEEDS_UPGRADE
|
||||
return
|
||||
fi
|
||||
@@ -45,7 +45,7 @@ trigger-nginx-vhosts-dependencies() {
|
||||
return
|
||||
fi
|
||||
|
||||
if ! which nginx >/dev/null 2>&1; then
|
||||
if ! command -v nginx &>/dev/null; then
|
||||
nginx_install
|
||||
return
|
||||
fi
|
||||
|
||||
@@ -75,7 +75,7 @@ fn-nginx-vhosts-nginx-location() {
|
||||
declare desc="check that nginx is at the expected location and return it"
|
||||
local NGINX_LOCATION
|
||||
|
||||
NGINX_LOCATION=$(which nginx 2>/dev/null)
|
||||
NGINX_LOCATION=$(command -v nginx 2>/dev/null)
|
||||
if [[ -z "$NGINX_LOCATION" ]]; then
|
||||
NGINX_LOCATION="/usr/sbin/nginx"
|
||||
fi
|
||||
|
||||
@@ -14,7 +14,7 @@ trigger-scheduler-docker-local-install() {
|
||||
|
||||
fn-plugin-property-setup "scheduler-docker-local"
|
||||
|
||||
DOKKU_PATH="$(which dokku)"
|
||||
DOKKU_PATH="$(command -v dokku)"
|
||||
|
||||
if [[ $(systemctl 2>/dev/null) =~ -\.mount ]]; then
|
||||
cat <<EOF >/etc/systemd/system/dokku-retire.service
|
||||
|
||||
Reference in New Issue
Block a user