File Monitor for LOC SMS Inbox Deployment
If your primary Rattail server runs Linux, and you have need to deploy files (SIL, etc.) from it to a LOC SMS server inbox, you unfortunately cannot do so directly. The reason is that SMS will only process files within its inbox which have had their archive bit cleared. It is not possible to clear this bit from a Linux process, since it requires the Windows API.
The workaround then is for the Linux Rattail process to deploy such files to a "pseudo" inbox folder. From there, a file monitor running on the SMS server must notice the incoming file and perform the final (actual) deployment to the SMS inbox (at which point the archive bit will be cleared and SMS will process the file).
This document explains the setup necessary for the file monitor only, on the SMS server.
Installation
Install Rattail dependencies on the SMS server, and install the following Rattail packages:
rattail
rattail.sw.locsms
See Installation for more details on how to do this.
Next you must register the file monitor; see Registering the Windows Service for instructions.
Configuration
Since the file monitor is running as a Windows service, you must choose one of the system-level default locations for your config file. (See Config File Location for more info.) This example will assume Windows 7 and use C:\ProgramData\rattail\rattail.conf as the location.
Create the file (and its parent directory), and in it put something like the following contents:
############################################################ # # Rattail File Monitor # ############################################################ #################### # edbob #################### [edbob] include_config = [r'\\server\rattail\Config\Store.conf'] #################### # Rattail #################### [rattail.filemon] monitored = sms_incoming sms_incoming.dirs = [r'\\server\rattail\SMS\Outbox'] sms_incoming.actions = ['rattail.sw.locsms.deploy:deploy_to_inbox', 'os:remove'] [rattail.sw.locsms] node = C:\storeman #################### # Logging #################### [handler_file] args = (r'C:\ProgramData\rattail\log\filemon.log', 'a')