Update unifi-controller to use set_ownership helper

This commit is contained in:
Josh Hagins 2015-08-02 12:44:13 -04:00 committed by Vítor Galvão
parent 160448b645
commit a71568fac5
1 changed files with 1 additions and 2 deletions

View File

@ -10,8 +10,7 @@ cask :v1 => 'unifi-controller' do
pkg 'Unifi.pkg'
postflight do
system '/usr/bin/sudo', '-E', '--',
'/usr/sbin/chown', '-R', '--', "#{Etc.getpwuid(Process.euid).name}:staff", Pathname.new(File.expand_path('~')).join('Library/Application Support/UniFi')
set_ownership '~/Library/Application Support/UniFi'
end
uninstall :pkgutil => 'com.ubnt.UniFi'