Merge pull request #34 from lakinduakash/30-unable-to-on-hotspot

Fix #30
This commit is contained in:
Lakindu Akash 2019-11-13 16:53:02 +05:30 committed by GitHub
commit 5209290e59
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1270,6 +1270,11 @@ fi
trap "cleanup_lock" EXIT
if [[ $(id -u) -ne 0 ]]; then
echo "You must run it as root." >&2
exit 1
fi
if ! init_lock; then
echo "ERROR: Failed to initialize lock" >&2
exit 1
@ -1294,11 +1299,6 @@ if [[ -n "$LIST_CLIENTS_ID" ]]; then
exit 0
fi
if [[ $(id -u) -ne 0 ]]; then
echo "You must run it as root." >&2
exit 1
fi
if [[ -n "$STOP_ID" ]]; then
echo "Trying to kill $PROGNAME instance associated with $STOP_ID..."
send_stop "$STOP_ID"