Comments on: Mac Servify autostart tip http://h3x.se/2011/04/mac-servify-autostart-tip/ spotify remote Sat, 29 Sep 2012 14:51:16 +0000 hourly 1 https://wordpress.org/?v=6.1.1 By: Vidar http://h3x.se/2011/04/mac-servify-autostart-tip/comment-page-1/#comment-4369 Sat, 29 Sep 2012 14:51:16 +0000 http://h3x.se/?p=787#comment-4369 Thanks for the tip on expect.
I have now changed my AppleScript to run this line:

do shell script “cd /Applications/Servify; expect start-servify.expect >/dev/null 2>&1 &”

and created the file start-servify.expect like this:

spawn mono Servify.exe
expect {*Username:*}
send my-user-name\r
expect {*Password:*}
send my-password\r
expect {*Use defaults?*:*}
send n\r
expect {*ListenPort:*}
send 1337\r
expect {*Bitrate*:*}
send 320\r
set timeout -1
expect timeout

Seems to work fine. Now locking down access to start-servify.expect should provide enough security.

]]>
By: johannes http://h3x.se/2011/04/mac-servify-autostart-tip/comment-page-1/#comment-1038 Sun, 12 Feb 2012 19:57:39 +0000 http://h3x.se/?p=787#comment-1038 In reply to Matt.

Matt,
there is a linux tool called “expect” which you might be able to use (not really sure here). There has also been support for loading credentials from a file: “mono Servify.exe login.txt” where login.txt has following layout:
username=somename
password=somepass
bitrate=320
port=1337

]]>
By: Matt http://h3x.se/2011/04/mac-servify-autostart-tip/comment-page-1/#comment-1010 Wed, 08 Feb 2012 06:42:17 +0000 http://h3x.se/?p=787#comment-1010 johannes-

I am setting up custom scripts to start and kill servify because it hangs in the shell if an error occurs and requires a kill pid.

I was wondering if theres a way to make this apple script run the mono servify.exe first, then supply the login details. Currently it runs the process with a pid that includes your login information in plain sight whereas the manual route only shows “mono servify.exe”. its a bit of a security risk.

do you know how to tailor this script to run a bit more like the manual start/connect process?

]]>