In a Chapter 13 bankruptcy there are specific provisions that allow a debtor to run many types of sole proprietor businesses, but there is no such provision in a Chapter 7. Now if you file Chapter 7 the trustee is supposed to marshal and liquidate your assets to pay your creditors. But of course, the trustee is not interested in running your business. Many service businesses (landscaping, hair styling, bookkeeping, selling real estate, etc.) require skills and licenses a trustee simply does not have. The trustee is also not keen on letting you run your business after you file a Chapter 7. If a debtor continues business and harms someone and the trustee let him continue that business, then the trustee is looking at potential liability for damages. So technically, you cannot keep a trustee from shutting down your sole proprietor business.
What can you do instead? First, you need to hire a good bankruptcy attorney. I know that people are tempted to file for Chapter 7 on their own but where your livelihood, your business, is at stake, hiring an attorney is a wise investment. Second, you need to help your attorney. Your attorney should be talking with the trustee to try and prevent the closing of your business or minimize the amount of time its closed to the shortest time frame possible. A motion to compel the trustee to abandon its interest in your business back to you may be one of the tools your attorney uses. The business assets will be listed on the schedules of assets that you file with your petition. Take pictures of these assets (tools, equipment, etc.) and make a list of your customers. See if you can claim these items under any exemptions to show the business has no value to the estate. Your attorney may even invite the trustee to come inspect the items (although most do not take the offer). Make it clear and be ready to prove that you have no employees, that you do not deal with hazardous materials, and that you have all the licenses and permits necessary to legally operate your business.