Script to restart cups

rdagel
New Contributor II

I have some policies to uninstall and reinstall some print drivers. I want
to make sure cups gets restarted. I made this script but want to make sure
that this is the best way to restart cups.

#!/bin/sh

sudo killall cupsd
sudo /usr/sbin/cupsd

Rich Dagel
Senior Technology Specialist

Landor Associates
1001 Front Street
San Francisco, CA 94111
United States
415 365 3933
http://www.landor.com
Rich.Dagel at landor.com

![external image link](attachments/9e2a95ebd9d14e21b26a74e70a613d7d)

2 REPLIES 2

Not applicable

If you're running this from a policy, I don't think you need sudo, as it will run as root anyway.

-Robert

tlarkin
Honored Contributor

In 10.5.8 I have the following handy binaries

/usr/sbin/cupsdisable

/usr/sbin/cupsenable