Trimmed some unnecessary lines in ops script

master
Chris Kankiewicz 2019-12-21 10:25:44 -07:00
parent a974bff50b
commit 82ecba66ff
No known key found for this signature in database
GPG Key ID: 474E915709CEB5EB
1 changed files with 0 additions and 3 deletions

View File

@ -2,15 +2,12 @@
set -o errexit
OPS_FILE="/etc/minecraft/ops.txt"
[ ! -e "${OPS_FILE}" ] && touch ${OPS_FILE}
for OP in "$@"; do
if grep -qx "${OP}" ${OPS_FILE}; then
echo "NOTICE: '${OP}' already present in OPs file"; continue
fi
echo "${OP}" >> ${OPS_FILE} && echo "SUCCESS: '${OP}' added to OPs file"
done