Browse files

shiftit: fixed addloginitem

  • Loading branch information...
1 parent d863544 commit aba4baa2d8ac7aece87b9e2e181a338c9828e9f3 Brian Cunnie committed Oct 26, 2012
Showing with 4 additions and 3 deletions.
  1. +4 −3 recipes/shiftit.rb
View
7 recipes/shiftit.rb
@@ -1,6 +1,8 @@
include_recipe "pivotal_workstation::addloginitem"
-unless File.exists?("/Applications/ShiftIt.app")
+app_path="/Applications/ShiftIt.app"
+
+unless File.exists?(app_path)
remote_file "#{Chef::Config[:file_cache_path]}/ShiftIt.app.zip" do
source "https://github.com/downloads/onsi/ShiftIt/ShiftIt.app.zip"
mode "0644"
@@ -14,7 +16,6 @@
# start up on login
execute "Start ShiftIt on login" do
- command "addloginitem /Applications/ShiftIt.app"
- user WS_USER
+ command "su #{WS_USER} -c \"addloginitem #{app_path}\""
end
end

0 comments on commit aba4baa

Please sign in to comment.