Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,3 +53,25 @@ fixuppm2.sh, cut/paste this line into the terminal window on your device
````bash
bash -c "$(curl -sL https://raw.githubusercontent.com/sdetweil/MagicMirror_scripts/master/fixuppm2.sh)"
````

## run script with automated answers

For example, to use the above scripts in an Ansible environment, it may be useful to answer the question up front and then let the script do its work.

* requirement is the `expect` package which you should find in most linux distributions
* example: `sudo apt install expect` for debian baste distributions

```
#!/usr/bin/expect -f

set timeout -1
spawn raspberry.sh

expect "Do you want use pm2 for auto starting of your MagicMirror (y/N)?"
send -- "Y\r"

expect "Do you want to disable the screen saver? (y/N)?"
send -- "Y\r"

expect eof
```