Backup mirror of main Nirbiboard repository on GitHub.
https://github.com/sbrl/Nibriboard
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
672 B
24 lines
672 B
#!/usr/bin/env bash |
|
|
|
################################################################################ |
|
################################### Settings ################################### |
|
################################################################################ |
|
|
|
# The port the nibriboard command server is listening on |
|
port=31587; |
|
|
|
################################################################################ |
|
|
|
command="$@"; |
|
|
|
if [[ "${command}" == "" ]]; then |
|
command="help"; |
|
fi |
|
|
|
echo "${command}" | nc ::1 $port; |
|
exit_code=$?; |
|
|
|
if [[ "${exit_code}" -ne "0" ]]; then |
|
echo -e "nibriboardctl: Can't contact the command server at [::1]:$port"; |
|
exit ${exit_code}; |
|
fi
|
|
|