Update create_ap

This commit is contained in:
Lakindu Akash 2019-11-13 16:50:31 +05:30 committed by GitHub
parent f8e0167f31
commit aa083c2388
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"