Seven people have been killed in two related shootings at a mushroom farm and a trucking firm in a coastal community south of San Francisco, and a suspect was in custody, officials say.

Four people were killed at the farm on Monday and three at the trucking business on the outskirts of Half Moon Bay, a city about 50 kilometres south of San Francisco, San Mateo County Board of Supervisors President Dave Pine said.
The police have arrested 67-year-old Chunli Zhao in connection with the shooting, he said.
Pine said the suspect worked for one of the businesses.
He called the suspect a ādisgruntled workerā.
The shooting was the nationās sixth mass shooting just 23 days into the new year and followed the killing of 11 people late Saturday at a ballroom dance hall in southern California.
The San Mateo County Sheriffās Office first received reports of a shooting just before 2.30pm and found four people dead from gunshot wounds and a fifth injured person at the first scene.
Shortly thereafter, officers found three more people dead from gunshot wounds at a second location about 8km away, Captain Eamonn Allen said in a news release.
The office did not share any information about the connection between the two locations.
The motive for the shooting was not known, Allen said.
About two hours after first responding, a sheriffās deputy found the suspect, Zhao, in his car at a sheriffās station in Half Moon Bay.
He was taken into custody and a weapon was found in his vehicle. The sheriffās department believes he acted alone, Allen said.
Television footage from the area showed officers taking a man into custody without incident.
Aerial television images also showed police officers collecting evidence from a farm with dozens of greenhouses.
The shooting followed the killing of 11 people late on Saturday at a ballroom dance hall in Southern California.
Half Moon Bay is a small coastal city with agricultural roots now home to about 12,000 people.
The city and surrounding San Mateo County area is known for producing flowers as well as vegetables such as brussels sprouts.
The county allows cannabis farming in certain areas.
āWe are sickened by todayās tragedy in Half Moon Bay,ā Pine said in a statement. āWe have not even had time to grieve for those lost in the terrible shooting in Monterey Park. Gun violence must stop.ā
California Governor Gavin Newsom tweeted that he was āat the hospital meeting with victims of a mass shooting when I get pulled away to be briefed about another shooting. This time in Half Moon Bay. Tragedy upon tragedy.ā
Want to see more stories from InDaily Qld in your Google search results?