Skip to main content

Automated Booster Configuration for Dynamic Network Environments

Description

Automated Booster configuration is useful when macOS or Windows devices move between offices, home networks, or other network locations. This example shows one way to let clients adjust their Booster settings based on location criteria.

Information

The included Fileset provides a macOS example. The Windows section gives a comparable approach using Task Scheduler.

Requirements:

The Fileset contains the following items:

image.png

  • Activation Script: load_booster_daemon.sh
  • Pre-Uninstallation Script: unload_booster_daemon.sh
  • LaunchDaemon: com.filewave.networkwatch.plist
  • Script: configure_boosters.sh
  • Plist file: booster_list.plist

The Fileset will place the LaunchDaemon which is set to be triggered on load and any network change.  Where a network change has occurred, the provided script will run, reconfigure the Booster settings if required and then restart the FileWave client.  By providing an additional plist file for booster settings per domain, the file may be updated without the requirement to reload the LaunchDaemon to react to the updated settings.

LaunchDaemon Verification
The verification settings of the LaunchDaemon are set to 'Download if missing'. The script triggered by the daemon will read and write to this file, preventing unnecessary re-runs. Therefore, the file should not be changed to Self-Healing.

As of FileWave 16, editing the client plist file will automatically cause the client to re-read the plist, without the need to restart the client.  Although restarting the client is not necessary, it won't harm.  The 'configure_boosters.sh' script contained within the Fileset restarts the client.  The bundled script still restarts the client; leave it in place unless you have tested the behavior in your environment. Below is the line that can be commented out if desired.

	# Restart the client to pick up the change
	/usr/local/bin/fwcontrol client restart

To comment out the restart, place a hash symbol at the beginning of the line, as per the line above.

If commenting out this line, the change will only be picked up once the LaunchDaemon is reloaded, after the client receives the newly updated script.

Directions

  • Download and import the Fileset into FileWave Central
  • Edit the 'booster_list.plist' file to meet requirements

The example uses the device hostname to identify a domain. The script then reads the matching dictionary from booster_list.plist, writes those Booster settings to the client preferences, and restarts the client.

For example, if the command returned the following:

hostname

$ hostname
ML1015.filewave.ch

The script would look in the booster_list.plist file for a dictionary called 'filewave.ch' and configure the client to match this dictionary.  The example file has been provided with 3 dictionaries for the following domains:

  • 'filewave.ch'
  • 'local'
  • 'home'

The example dictionary from the 'booster_list.plist' for 'filewave.ch' is:

booster_list.plist

	<key>filewave.ch</key>
	<dict>
		<key>booster1</key>
		<string>booster1.filewave.ch</string>
		<key>booster1Port</key>
		<integer>20013</integer>
		<key>booster1PublishPort</key>
		<integer>20003</integer>
		<key>booster2</key>
		<string>booster2.filewave.ch</string>
		<key>booster2Port</key>
		<integer>20013</integer>
		<key>booster2PublishPort</key>
		<integer>20003</integer>
		<key>booster3</key>
		<string>booster3.filewave.ch</string>
		<key>booster3Port</key>
		<integer>20013</integer>
		<key>booster3PublishPort</key>
		<integer>20003</integer>
		<key>booster4</key>
		<string>booster4.filewave.ch</string>
		<key>booster4Port</key>
		<integer>20013</integer>
		<key>booster4PublishPort</key>
		<integer>20003</integer>
		<key>booster5</key>
		<string>no.booster.set</string>
		<key>booster5Port</key>
		<integer>0</integer>
		<key>booster5PublishPort</key>
		<integer>0</integer>
		<key>boosterRouting</key>
		<false/>
	</dict>

Edit the domain name, Booster names, and settings for each dictionary to match your environment. If no Booster should be used for one of the five Booster slots, use no.booster.set as shown for booster5.

If the device reports a domain that is not in the list, a default domain will be used.  Specify which default domain should be used within the 'booster_list.plist' file.  The example provided is set to use 'local' as the default domain and if implemented, the values of the 'local' dictionary keys will be read from the 'booster_list.plist' file.

Default Domain

	<key>default</key>
	<string>local</string>

Once all domains have been set, with relevant criteria for each dictionary, the Fileset may be associated, tested and then implemented.

Windows

Windows has a similar option to LaunchDaemons, 'Task Scheduler'.  Powershell may be used to import scheduled tasks:

https://docs.microsoft.com/en-us/powershell/module/scheduledtasks/register-scheduledtask?view=win10-ps

A scheduled task can be triggered from network event IDs such as:

  • Log: Microsoft-Windows-NetworkProfile/Operational
  • Source: NetworkProfile
  • Event ID 10000 Connection to a network
  • Event ID 10001  Disconnection from a network

This task could trigger a script.  Once created, it may then be exported, added to a Fileset with an appropriate script to be triggered by the task, designed to update the booster configuration of the client, and installed using an Activation script by the register-scheduledtask Powershell command.

Conclusion

This is one example of automatic Booster configuration. IP ranges can also be used, but overlapping ranges between locations can cause the wrong settings to apply. Some environments may need both domain and IP-range checks.

There is no one-size-fits-all Fileset for this. Choose a location signal that reliably distinguishes the networks where each Booster configuration should apply.

Incorrect Configuration
If devices receive a Booster configuration that does not match their location, management traffic may fail until the misconfiguration is corrected. Test with a small group before broad deployment.