142

Value returned by getConnectedUsers

 

(afp:usersArray:_array_index:<n>:)

Description

<serviceType>

The share point the user is accessing.

 

 

<sessionID>

An integer that identifies the user session.

 

 

<state>

State of the service.

 

 

Sending a Message to AFP Users

You can use the sendMessage command with the serveradmin tool to send a text message to connected AFP users. Users are specified by session ID.

To send a message:

$ sudo serveradmin command

afp:command = sendMessage

afp:message = "message-text"

afp:sessionIDsArray:_array_index:0 = sessionid1

afp:sessionIDsArray:_array_index:1 = sessionid2

afp:sessionIDsArray:_array_index:2 = sessionid3

[...] Control-D

Parameter

Description

message-text

The message that appears on client computers.

 

 

sessionidn

The session ID of a user you want to receive the message. To list the

 

session IDs of connected users, use the getConnectedUsers

 

command. See “Listing Connected Users” on page 141.

 

 

Disconnecting AFP Users

You can use the disconnectUsers command with the serveradmin tool to disconnect AFP users. Users are specified by session ID. You can specify a delay time before disconnect and a warning message.

To disconnect users:

$ sudo serveradmin command afp:command = disconnectUsers afp:message = "message-text" afp:minutes = minutes-untilafp:sessionIDsArray:_array_index:0 = sessionid1 afp:sessionIDsArray:_array_index:1 = sessionid2 afp:sessionIDsArray:_array_index:2 = sessionid3 [...]

Control-D

Parameter

Description

message-text

The text of a message that appears on client computers in the

 

disconnect announcement dialog.

 

 

Chapter 9 Working with File Services

Page 142
Image 142
Apple Mac OS X Server Sending a Message to AFP Users, Disconnecting AFP Users, To send a message, To disconnect users