Basic shell Command not working on call

Hi im on Ha 0.97.2 on Raspberry with hassio
I tried to make a simple script that calls a shell command service to restart the Raspberry
I write in path \home assistant\shell_command\shell_command.yaml the:

rebootpi:‘ssh pi@xxxxx sudo reboot’

i make a script \home assistant\scripts\reboot pi.yaml to call the service:

reboot_pi:
alias: Reboot the Pi
sequence:
- data: {}
service: shell_command.rebootpi

also i included on confiquratior file without errors on check file :

shell_command: !include_dir_merge_named shell_command

but when i run from scripts that already shows i get this error:

Failed to call service script/reboot_pi. Unable to find service shell_command/rebootpi

How bizarre. Why are you using ssh to log into the host that is already running home assistant. How about

shell_command:
    reboot_pi: sudo reboot

I changed but still get the same error

Have you fixed the problem?
I have the same problem.

My installation is Raspbian GNU / Linux 10 (buster)

configuration.yalm
shell_command:
restart: ./media/jbreboot

Script: jbreboot
pi@raspberrypi:/media $ ls -l jbreboot
-rwxrwxrwx 1 pi pi 111 de febr. 7 21:15 jbreboot

#!/bin/bash

LOGFILE="/media/LogReboot.txt""

echo Init > $LOGFILE
sudo reboot >> $LOGFILE
echo end >> $LOGFILE

Execute script from Home Assistant. this execution create a log file /media/LogReboot.txt
but not reboot the system.

pi@raspberrypi:/media $ ls -l LogReboot.txt
-rw-r–r-- 1 homeassistant homeassistant 9 de febr. 7 21:19 LogReboot.txt

and the content of file log are:
pi@raspberrypi:/media $ cat LogReboot.txt
Init
end

i think it ignores the reboot statement

can anyone help me?