0

On my Windows PC I got a Putty Batch File that connects to my Pi (SSH - Openelec), authenticates as root, kills a process (hyperiond), and starts it again. I have to use this file frequently because hyperion sometime gets pretty messed up (at least for me).

In Short it does the following:

Connect to 192...... ; 
Authenticate as root with password ; 
Run the commands: killall hyperiond ; 
and /storage/hyperion/bin/hyperiond.sh /storage/.config/hyperion.config.json

I would like to do the same thing with my Macbook. Is there the possibility to create such a "batch" file on Mac with terminal?

1 Answer 1

0

yes, there should be sh and ssh on Mac.

  • Create a file batch.sh
  • Make it executable chmod u+x batch.sh

Content of file:

#!/bin/sh
ssh root@192... "killall hyperiond; /storage/hyperion/bin/hyperiond.sh /storage/.config/hyperion.config.json"

And then run it as ./batch.sh. It should prompt for the password and execute the batch. If you want to get rid of the password, set up the keys:

ssh-keygen -t rsa
ssh-copy-id root@192...

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .