Creating a Mac Service for the RLM Server

Creating a Mac Service for the RLM Server

Summary

This guide will walk you through how to create a Mac service for the RLM Server. Sudo permission may be required to interact with some of the directories needed to create the service, such as /Library, but should not be required for user library, i.e. ~/Library

  1. Download an Admin bundle from our website.
  2. Extract the contents of the downloaded admin bundle
    gunzip [RLM admin bundle name].tar.gztar xvf [RLM admin bundle name].tar

Option #1: Creating the RLM Service on Mac using Login Items & Extensions

  1. Navigate to System Settings -> General -> Login Items & Extensions
  2. Click the '+' icon and add the rlm executable
  1. RLM will run on Login for this user

Option #2: Creating the RLM Service on Mac using launchctl and LaunchAgents (starts on login)

  1. Open a terminal by going to Spotlight (Command + Space) -> Type in ‘Terminal’ and hit Enter/Return
  2. Change directories: cd  /Library/LaunchAgents
  3. Create a file here for your service (may need to be done as sudo)
  4. touch com.[your-user].rlm-service.plist
  5. Open the file in a text editor either from the terminal (nano, vim) or directly from Finder
  6. Insert this template into your service file and make any necessary changes:

<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN"

"http://www.apple.com/DTDs/PropertyList-1.0.dtd">

<plist version="1.0">

<dict>

  <!-- Unique label for your service, change [your-user] to your username -->

   <key>Label</key>

   <string>com.[your-user].rlm-service</string>

   <!-- Run the RLM server-->

   <key>ProgramArguments</key>

   <array>

       <!-- RLM executable -->

       <string>/Path/To/RLM</string>

       <!-- License file - Optional -->

       <string>-c</string>

       <string>/Path/To/License/File </string>

      <!—RLM debug log  -->

       <string>-dlog</string>

       <string>/Path/To/Log </string>

   </array>

  <!-- Start it when you log in -->

   <key>RunAtLoad</key>

   <true/>

   <!-- Restart if it exits -->

   <key>KeepAlive</key>

   <true/>

<!-- Set working directory to where your files live -->

   <key>WorkingDirectory</key>

   <string>/Path/To/Dir </string>

</dict>

</plist>
** Note that any startup options must be added string-by-string in the ProgramArguments section, i.e. <string>-dlog</string><string>/Path/To/Debuglog</string>

Creating the RLM Service on Mac using launchctl and LaunchAgents (Continued)  

  1. Save the changes made to the .plist file
    • You can double check that the contents of the plist file are valid by running (may need to be done as sudo): plutil -lint ~/Library/LaunchAgents/com.[your-user].rlm-service.plist
  2. Bootstrap the service (you may need to do this as sudo): sudo launchctl bootstrap gui/$(id -u) ~/Library/LaunchAgents/com.[your-user].rlm-service.plist
  3. Enable the service: launchctl enable gui/$(id -u)/com.[your-user].rlm-service.plist
  4. Kickstart the service:  
    launchctl kickstart -k gui/$(id -u)/com.[your-user].rlm-service.plist
  5. Verify that the service is running: launchctl print gui/$(id -u)/com.[your-user].rlm-service

Disabling the service if needed:

sudo bootout gui/$(id -u) ~/Library/LaunchAgents/com.[your-user].rlm-service.plist

Products:
Tags:
No items found.