Apple Event: May 7th at 7 am PT

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

How do I check if remote login is enabled in Applescript?

I have a script that checks if its sunday or monday, then requests to turn on remote login. Could I easily change it so that it checks if remote login is on, then if it is not, request to turn it on?

This is my script:



on remoteLogin(value)



do shell script "launchctl " & value & " -w /System/Library/LaunchDaemons/ssh.plist" with administrator privileges


end remoteLogin

if weekday of (current date) is in {Sunday, Monday} then



remoteLogin("load")


else


return "not Sunday or Monday"


end if

Posted on Mar 13, 2018 7:25 AM

Reply

There are no replies.

How do I check if remote login is enabled in Applescript?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.