Skip to content

Commit

Permalink
Update maintenance.sh
Browse files Browse the repository at this point in the history
Add missing "Detect absolute and full path as well as filename of this script."
  • Loading branch information
tmiland committed Apr 3, 2019
1 parent ea3a187 commit e6fc40a
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion maintenance.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ set -e
######################################################################


version='1.0.1'
version='1.0.2'
#------------------------------------------------------------------------------#
#
# MIT License
Expand Down Expand Up @@ -41,6 +41,14 @@ version='1.0.1'
SERVICE_NAME=nginx.service
maintenance_file_path=/etc/nginx/html/server-error-pages/_site
GITHUB_REPO=https://github.com/tmiland/Nginx-Maintenance-Mode
# Detect absolute and full path as well as filename of this script
cd "$(dirname $0)"
CURRDIR=$(pwd)
SCRIPT_FILENAME=$(basename $0)
cd - > /dev/null
sfp=$(readlink -f "${BASH_SOURCE[0]}" 2>/dev/null || greadlink -f "${BASH_SOURCE[0]}" 2>/dev/null)
if [ -z "$sfp" ]; then sfp=${BASH_SOURCE[0]}; fi
SCRIPT_DIR=$(dirname "${sfp}")
# Icons used for printing
ARROW=''
DONE=''
Expand Down

0 comments on commit e6fc40a

Please sign in to comment.