* Tue Mar 18 2025 Jean-Philippe Pialasse <jpp@koozali.org> 11.0.0-9.sme
- update config for Nut 2.8.2 [SME: 12657] TODO review master/slave mode TODO convert master/slave to primary/secondary TODO convert to new config data + migrate TODO event and action
This commit is contained in:
		
							
								
								
									
										18
									
								
								root/etc/e-smith/events/actions/nut-config-drivers
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										18
									
								
								root/etc/e-smith/events/actions/nut-config-drivers
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,18 @@
 | 
			
		||||
#!/bin/bash
 | 
			
		||||
 | 
			
		||||
#if MODE = netserver then access should be private
 | 
			
		||||
#if MODE = netclient only enable monitor
 | 
			
		||||
 | 
			
		||||
# calling this script to configure unit and drivers
 | 
			
		||||
if [[ $(config getprop nut status || echo "disabled") == "disabled" ]] ; then
 | 
			
		||||
	# disable server
 | 
			
		||||
	# leave monitor as is, we might want to monitor an external ups ?
 | 
			
		||||
	# get_all_by_prop filter nut-driver@ and foreach $UPS disabled 
 | 
			
		||||
	exit 0;
 | 
			
		||||
fi
 | 
			
		||||
# nut is enabled 
 | 
			
		||||
# enable nut-monitor
 | 
			
		||||
# enable nut-server "enable	nut-server.service\n" if ($master eq  'yes');
 | 
			
		||||
# get_all_by_prop filter nut-driver@ and foreach $UPS enable.
 | 
			
		||||
 | 
			
		||||
/usr/libexec/nut-driver-enumerator.sh
 | 
			
		||||
		Reference in New Issue
	
	Block a user