Whenever you restart your K4 server, there are several scripts that you need to remember to start in Terminal; CopyBLOBs, SwitchIssues and SendNotificationMail. Typically, you restart the machine then click on the RunScript.Command file in each of their respective folders in K4_Server_Software > K4. While it's not a difficult task it's often forgotten, meaning that BLOBs are not automatically being copied out on a regular interval, your previous, current and next issues may not be set correctly, and no email alerts will be sent.
On Macintosh servers, there is an easy way to have these scripts start up automatically. The solution is to use Automator; a utility available in OSX that allows a user to create automation workflows to perform a multitude of tasks in OSX. Basically what we do is we create an Automator application that locates the RunScript.Command file for each of the scripts we want to start, and then add this to our start-up items.
First start Automator (Applications > Automator).
Select Custom and then click Choose.
In the Library to the left there are all sorts of different categories of different types of actions you can perform. For our purposes here, we want to choose Files & Folders. In the next pane over we want to choose Find Finder Items. Click and drag Find Finder Items to the right hand pane, and that action will be added to the Automator workflow.
Now in the right hand panel we need to locate the scripts we want to start. We do this by using the drop down list next to Where: and selecting Other, then selecting the path to our RunScript.Command. For example, for CopyBLOBs it would be Applications\K4_Server_Software\K4\CopyBLOBs. Now below that, where it says Whose: we set it to name is equal to and then type in RunScript.Command. This will find the RunScript.Command in the CopyBLOBs Folder. Now simply drag over Find Finder Items again and add the information for SwitchIssues, and again for SendNotificationMail.
Next we just need to tell Automator to open these files. So in the left pane, in Files & Folders select Open Finder Items and drag it to the right pane. Select Terminal from the Open With drop down (you may have to use other and then navigate to Terminal in the Utilities folder) and now your workflow is complete. If you want to test that it is working correctly, you can simply click the Run button in the upper right hand corner of the Automator window.
Now in Automator select File> Save as. In the resulting dialog box name your workflow appropriately, for example StartK4Scripts, set the File Format to Application, and save it in the K4_Server_Software folder so that you can easily find it.
Now all that's left to do is add this new Automator Application to your start-up items. You do this by going to System Preferences > Accounts. Select the correct account and then click on the Login Items tab. Use the plus sign towards the bottom to add your new application from the location you saved it in.
That's it! Now when you re-boot your machine, these scripts will automatically start.
Posted at 12:00 pm by Robert Underwood
Contact DPCI to learn more about our Web content management systems,
digital asset management solutions,
online collaboration software,
custom development,
multi-channel publishing systems, and
workflow management solutions.