Mac Run PlantUML Server on Login
To run a PlantUML server on login for your Mac, you can follow these steps using Automator. This will ensure that the PlantUML server starts automatically every time you log in.
Step 1: Install PlantUML
First, make sure you have PlantUML installed on your Mac using Homebrew. You’ve already mentioned the command:
|
|
Step 2: Create an Automator App
-
Open “Automator” on your Mac. You can find it by searching for it in Spotlight or in the Applications folder.
-
When Automator opens, it will ask you to choose a type for your document. Select “Application” and click “Choose.”
-
In the left-hand Actions pane, search for “Run Shell Script” and drag it to the right-hand workflow pane.
-
In the “Run Shell Script” action, set “Shell” to “/bin/bash” (or “/bin/zsh” if you use Zsh), and “Pass input” to “as arguments.”
-
In the script box, add the following command to start the PlantUML server with nohup and send its output to
/dev/null
:
|
|
- Save your Automator workflow as an application by clicking “File” > “Save” and giving it a name like “PlantUMLServer.”
Step 3: Add Automator App to Startup Apps
-
Open “System Preferences” on your Mac.
-
Click on “Users & Groups.”
-
In the left-hand sidebar, select your user account.
-
Click the “Login Items” tab on the right-hand side.
-
Click the “+” button below the list of login items.
-
Navigate to where you saved the “PlantUMLServer” Automator application and select it.
-
Click the “Add” button to add it to the list of login items.
Now, every time you log in to your Mac, the PlantUML server should automatically start and run in the background.
Please note that the paths and file names mentioned here are based on the information you provided. Make sure they match your system configuration. Additionally, ensure that you have the necessary permissions to run the PlantUML server on port 9191 if it requires elevated privileges.