From 13f0b77b592f15acf27c73362ecac0594b8fbcf6 Mon Sep 17 00:00:00 2001 From: "nicolas.dorier" Date: Fri, 18 May 2018 00:26:59 +0900 Subject: [PATCH] ensure sourced --- btcpay-setup.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/btcpay-setup.sh b/btcpay-setup.sh index e059d29..557e491 100755 --- a/btcpay-setup.sh +++ b/btcpay-setup.sh @@ -1,5 +1,10 @@ #!/bin/bash +if [ "$0" != "$BASH_SOURCE" ]; then + echo "This script must be sourced \". btcpay-setup.sh\"" + exit 1 +fi + if [[ $EUID -ne 0 ]]; then echo "This script must be run as root" return