Sending a Message to AFP Users

You can use the serveradmin sendMessage command 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 72.

 

 

Disconnecting AFP Users

You can use the serveradmin disconnectUsers command 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-until 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 text of a message that appears on client computers in the

 

disconnect announcement dialog.

 

 

minutes-until

The number of minutes between the time the command is issued

 

and the users are disconnected.

 

 

sessionidn

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

 

IDs of connected users, use the getConnectedUsers

 

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

 

 

Chapter 8 Working With File Services

73

Page 73
Image 73
Apple oxs manual Sending a Message to AFP Users, Disconnecting AFP Users, To send a message, To disconnect users