Add exit_connect, start_server, stop_server hooks. These would be similar to the init_connect command that is executed when a connection is created. The exit_connect command would be executed as the connection user. The start_server and stop_server should be run as user 'root' with SUPER_ACL privileges) (Note that this is troublesome as the server may not have a 'root' user, so we may want to allow the user to specify that name of the super user on the command line)
Observers changed: Sergei