diff --git a/script/locate b/script/locate new file mode 100755 index 0000000..a6d81b1 --- /dev/null +++ b/script/locate @@ -0,0 +1,5 @@ +#!/usr/bin/env bash + +set -e + +nginx -V 2>&1 | grep "configure arguments:" | sed 's/[^*]*conf-path=\([^ ]*\)\/nginx\.conf.*/\1/g' diff --git a/script/locate-nginx b/script/locate-nginx deleted file mode 100755 index a6d81b1..0000000 --- a/script/locate-nginx +++ /dev/null @@ -1,5 +0,0 @@ -#!/usr/bin/env bash - -set -e - -nginx -V 2>&1 | grep "configure arguments:" | sed 's/[^*]*conf-path=\([^ ]*\)\/nginx\.conf.*/\1/g' diff --git a/script/locate-nginx b/script/locate-nginx new file mode 120000 index 0000000..3fcf8a5 --- /dev/null +++ b/script/locate-nginx @@ -0,0 +1 @@ +locate \ No newline at end of file diff --git a/script/restart b/script/restart new file mode 100755 index 0000000..f7c709d --- /dev/null +++ b/script/restart @@ -0,0 +1,14 @@ +#!/usr/bin/env bash + +set -e + +# colours +YELLOW='\033[1;33m' +NC='\033[0m' # no colour - reset console colour + +echo -e "${YELLOW}Restarting nginx. This requires sudo access.${NC}" + +if pgrep 'nginx' > /dev/null; then + sudo nginx -s stop +fi +sudo nginx diff --git a/script/restart-nginx b/script/restart-nginx deleted file mode 100755 index f7c709d..0000000 --- a/script/restart-nginx +++ /dev/null @@ -1,14 +0,0 @@ -#!/usr/bin/env bash - -set -e - -# colours -YELLOW='\033[1;33m' -NC='\033[0m' # no colour - reset console colour - -echo -e "${YELLOW}Restarting nginx. This requires sudo access.${NC}" - -if pgrep 'nginx' > /dev/null; then - sudo nginx -s stop -fi -sudo nginx diff --git a/script/restart-nginx b/script/restart-nginx new file mode 120000 index 0000000..b7dc720 --- /dev/null +++ b/script/restart-nginx @@ -0,0 +1 @@ +restart \ No newline at end of file