vsts_unix_service

in libraries/service.rb [67:84]


      def vsts_unix_service(action)
        if action == 'enable'
          action = "install #{@user}"
        elsif action == 'disable'
          action = 'uninstall'
        end
        envvars = { HOME: "/Users/#{@user}" }
        execute = Chef::Resource::Execute.new("Run action '#{action}' on service for agent '#{@agent_name}'", Chef.run_context)
        execute.cwd(@install_dir)
        execute.command("./svc.sh #{action}")
        if osx?
          execute.user(@user)
          execute.group(@group)
          execute.environment(envvars)
        end
        execute.run_action(:run)
      end