Automating The Server.app Setup (Update) Using A Script

DBI_Support
New Contributor

Hi all,

I'm updating the server app on over 300 Mac servers, and need an automated method to run through the prompts, with out touching them directly. I've found a few options out there, and I'll include the one I've gotten closest to working.

```

!/usr/bin/expect

set timeout 300 spawn server setup expect "Press Return to view the software license agreement." { send } expect "Do you agree to the terms of the software license agreement? (y/N)" { send "y " } expect "User name:" { send "MYADMINUSERNAME " } expect "Password:" { send "MYPASSWORD " } interact
``

When I run this, I do see the user agreement in the log, but it stops mid way through and returns this:

-bash: my hidden jss admin account's password: command not found

I'm assuming it's getting tripped on that because that's the account the script is being run from, but I can seem to figure a way around it. I'm a scripting hack, at best, so I'm struggling (like all day) with this. Any help would be appreciated.

Thanks!

0 REPLIES 0