If the board of supervisors without authority of law orders any amount paid as salary, fees, or for any other purposes and the money is actually paid, or if any county officer draws any warrant in his own favor or in favor of any other person without authorization by the board or law and the warrant is paid, the district attorney shall institute suit in the name of the county to recover the money paid, and 20 percent damages for the use thereof. If the money has not been paid on the order or warrants, the district attorney upon receiving notice thereof shall commence suit in the name of the county to restrain the payment. An order of the board is not necessary in order to maintain the suits.