The server commands are used to manage your Hansoft server.
Run commands from the HPMServer.
You will find it in the directory where you installed the server.
The default installation path on OS X is /Applications/Hansoft Server.
Server command example:
sudo ./HPMServer -AddService MyServer01
-Creates a new service called MyServer01-
Note that some commands will require root access.
|-AddService <Service Name>||Adds the current executable to the system as a service.|
|-AddServiceIfNotAdded <Service Name>||Adds the current executable to the system as a service if a service with the same name does not exist.|
|-RemoveService <Service Name>||Removes the program from the system server list.|
|-StartService <Service Name>||Attempts to start the service.|
|-StopService <Service Name>||Attempts to stop the service.|
|-RunAsProgram||Runs the server as a usual program in the background. Make sure that user running the program has read and write access to the installation directory.|
|-Service <Service Name>||Starts the program as a service. Only used by the system.|
|-Uninstall <Service Name>||Backs up the database, stops the service and removes the service from the system.|
|-Version||Displays the program version.|
|-ResetAdminPassword||Resets the admin password. After invoking this command you will be asked to enter the new password and then re-enter to confirm the change.|
|-OverridePort <Port>||Overrides the port used for this server during this session.|
|-CreateConfig <Configuration File>||Creates an initial configuration. -CreateConfig ServerName ServerAdminPassword ServerPort bCreateDatabase [DatabaseName DatabaseAdminPassword].|
|-RunAsUser||The user to run the service as.|
|-RunAsGroup||The group to run the service as.|
|-BackupAllDatabases||Stops listening for connections, gracefully logs out all users and then does a backup of all online databases. Used during upgrades on Windows systems. If you have run this command you need to restart the service to accept connections again.|
|-BackupAndStop||The same as -BackupAllDatabases, but additionally stops service after all databases have finished backing up. Should be run before upgrades to reset transaction logs.|
-CreateConfig Creates a initial configuration from a text file.
The file can contain the following key-value pairs:
|ServerPassword "<Password>"||Required. Password for server administrator.|
|DatabasePassword "<Password>"||Required. Password for database administrator.|
To configure the server email functionality the file should also contain the following pairs:
|Email_OutgoingServer "<Hostname>"||Outgoing email server hostname.|
|Email_FromName "<Name>"||Email Address appearing as from on emails.|
|EmailSubject "<subject>"||Subject of email notifications.|
|EmailToEmail "<target address>"||Sender name.|
|Email_FromEmail "<Address>"||Sender address.|
|Email_Subject "<Subject>"||Subject of email.|
|Email_SendTo "<Addresses>"||Recipients. Seperate multiple entries by comma, semicolon or space.|
|Email_Authentication "<0/1>"||Authentication: 0 = Disable, 1 = Enable.|
|Email_UserName "<Username>"||Email username.|
|Email_Password "<Password>"||Email password.|
|Email_SecurityProtocol "<0/1/2>"||Protocol: 0 = None, 1 = SSL, 2 = TLS.|
|Email_EmailLog "<0/1>"||Log outgoing emails: 0 = Disable, 1 = Enable.|
|Email_SendTestEmail "<0/1>"||Send test email when starting up: 0 = Disable, 1 = Enable.|
|Email_OutgoingPort "<Port>"||Port number.|