Created
September 15, 2025 19:54
-
-
Save nyanSpark/9e18a0276921b7195e3857cbc6964395 to your computer and use it in GitHub Desktop.
AOOSTAR WTR MAX Help Guide for sensors and display configuration
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # For Unraid 7.x / User Scripts or Terminal Commands | |
| # AOOSTAR-X Service Start User Script | |
| #!/bin/bash | |
| cd /mnt/cache/appdata/AOOSTAR-X-linux && (nohup ./AOOSTAR-X > aoostar.log 2>&1 & echo $! > aoostar.pid && echo "PID saved to aoostar.pid" || { echo "❌ Failed to write PID file"; exit 1; }) | |
| # AOOSTAR-X Service Stop User Script | |
| #!/bin/bash | |
| PIDFILE="/mnt/cache/appdata/AOOSTAR-X-linux/aoostar.pid" | |
| if [[ -f "$PIDFILE" ]]; then | |
| PID=$(cat "$PIDFILE") | |
| if kill -0 "$PID" 2>/dev/null; then | |
| kill "$PID" | |
| echo "✅ Stopped AOOSTAR-X (PID $PID)." | |
| else | |
| echo "⚠️ No running process found with PID $PID." | |
| fi | |
| rm -f "$PIDFILE" | |
| else | |
| echo "❌ PID file not found. Is AOOSTAR-X running?" | |
| fi | |
| ### TORRENT DOCKER RESTART ### | |
| #!/bin/bash | |
| # Ensure we're running in bash | |
| set -e | |
| # Docker Restart Script for Unraid | |
| # This script restarts a specified Docker container | |
| # To be run every 6 hours via Unraid User Scripts plugin | |
| # Configuration - CHANGE THESE VALUES | |
| CONTAINER_NAME="binhex-qbittorrentvpn" | |
| # Function to log messages to system log | |
| log_message() { | |
| logger -t "docker-restart-script" "$1" | |
| } | |
| # Start logging | |
| log_message "=== Docker Restart Script Started ===" | |
| # Check if container exists | |
| all_containers=$(/usr/bin/docker ps -a --format "{{.Names}}") | |
| if echo "$all_containers" | /bin/grep -q "^${CONTAINER_NAME}$"; then | |
| log_message "Container '$CONTAINER_NAME' found" | |
| # Check if container is running | |
| running_containers=$(/usr/bin/docker ps --format "{{.Names}}") | |
| if echo "$running_containers" | /bin/grep -q "^${CONTAINER_NAME}$"; then | |
| log_message "Restarting running container '$CONTAINER_NAME'..." | |
| # Restart the container | |
| if docker restart "$CONTAINER_NAME"; then | |
| log_message "Successfully restarted container '$CONTAINER_NAME'" | |
| else | |
| log_message "ERROR: Failed to restart container '$CONTAINER_NAME'" | |
| exit 1 | |
| fi | |
| else | |
| log_message "Container '$CONTAINER_NAME' is not running, starting it..." | |
| # Start the container | |
| if docker start "$CONTAINER_NAME"; then | |
| log_message "Successfully started container '$CONTAINER_NAME'" | |
| else | |
| log_message "ERROR: Failed to start container '$CONTAINER_NAME'" | |
| exit 1 | |
| fi | |
| fi | |
| else | |
| log_message "ERROR: Container '$CONTAINER_NAME' not found" | |
| # List available containers to system log | |
| available_containers=$(docker ps -a --format "{{.Names}}" | tr '\n' ' ') | |
| log_message "Available containers: $available_containers" | |
| exit 1 | |
| fi | |
| log_message "=== Docker Restart Script Completed ===" | |
| # Turn AOOSTAR Display Off in Terminal | |
| stty -F /dev/ttyACM0 raw | |
| printf "\252U\252U\12\0\0\0" > /dev/ttyACM0 | |
| # https://zehnm.github.io/aoostar-rs/shell_commands.html |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Do I understand that this allows the display to work/integrate with unRAID or does it simply turn it on and off?
Also I have been having issues getting any CPU or other temperature sensors working with the WTR Max and unRAID. Any direction you could point me towards?
Thanks!