fixes
This commit is contained in:
		
							parent
							
								
									402aeda5f0
								
							
						
					
					
						commit
						e4c3fe52b3
					
				
							
								
								
									
										2
									
								
								Makefile
								
								
								
								
							
							
						
						
									
										2
									
								
								Makefile
								
								
								
								
							|  | @ -40,7 +40,7 @@ $(PACKAGE_SCRIPTS) \ | ||||||
| --vendor "$(VENDOR)" \ | --vendor "$(VENDOR)" \ | ||||||
| --description "$(DESC)" \ | --description "$(DESC)" \ | ||||||
| --config-files "/etc/$(BINARY)/$(CONFIG_FILE)" \ | --config-files "/etc/$(BINARY)/$(CONFIG_FILE)" \ | ||||||
| --freebsd-origin "golift/$(BINARY)" | --freebsd-origin "$(BINARY)/$(BINARY)" | ||||||
| endef | endef | ||||||
| 
 | 
 | ||||||
| PLUGINS:=$(patsubst plugins/%/main.go,%,$(wildcard plugins/*/main.go)) | PLUGINS:=$(patsubst plugins/%/main.go,%,$(wildcard plugins/*/main.go)) | ||||||
|  |  | ||||||
|  | @ -1,11 +1,14 @@ | ||||||
| #!/bin/bash | #!/bin/sh | ||||||
| 
 | 
 | ||||||
| # This file is used by deb and rpm packages. | # This file is used by txz, deb and rpm packages. | ||||||
| # FPM adds this as the after-install script. | # FPM adds this as the after-install script to all packages. | ||||||
| 
 | 
 | ||||||
| if [ -x "/bin/systemctl" ]; then | if [ -x "/bin/systemctl" ]; then | ||||||
|   # Reload and restart - this starts the application as user nobody. |   # Reload and restart - this starts the application as user nobody. | ||||||
|   /bin/systemctl daemon-reload |   /bin/systemctl daemon-reload | ||||||
|   /bin/systemctl enable unifi-poller |   /bin/systemctl enable unifi-poller | ||||||
|   /bin/systemctl restart unifi-poller |   /bin/systemctl restart unifi-poller | ||||||
|  | elif [ -x /usr/sbin/service ]; then | ||||||
|  |   # Do not start or restart on freebsd. That's "bad practice." | ||||||
|  |   /usr/sbin/service unifi-poller enabled || /usr/sbin/service unifi-poller enable | ||||||
| fi | fi | ||||||
|  |  | ||||||
|  | @ -1,6 +1,6 @@ | ||||||
| #!/bin/bash | #!/bin/sh | ||||||
| 
 | 
 | ||||||
| # This file is used by rpm and deb packages. FPM use. | # This file is used by txz, rpm and deb packages. FPM use. | ||||||
| 
 | 
 | ||||||
| if [ "$1" = "upgrade" ] || [ "$1" = "1" ] ; then | if [ "$1" = "upgrade" ] || [ "$1" = "1" ] ; then | ||||||
|   exit 0 |   exit 0 | ||||||
|  | @ -9,4 +9,7 @@ fi | ||||||
| if [ -x "/bin/systemctl" ]; then | if [ -x "/bin/systemctl" ]; then | ||||||
|   /bin/systemctl stop unifi-poller |   /bin/systemctl stop unifi-poller | ||||||
|   /bin/systemctl disable unifi-poller |   /bin/systemctl disable unifi-poller | ||||||
|  | elif [ -x /usr/sbin/service ]; then | ||||||
|  |   /usr/sbin/service unifi-poller stop | ||||||
|  |   /usr/sbin/service unifi-poller disable | ||||||
| fi | fi | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue