#!/bin/bash # Check if server is started status=$(systemctl show mcbe -p ActiveState --value) if [[ $status != active ]]; then echo "Error: Server is not active!" exit 1 fi today=$(date "+%Y-%m-%d %H:%M:%S") echo "$*" > /run/mcbe sleep 0.2 journalctl -u mcbe -S "$today" -o cat