Skip to main content
Question

Script to restart cups

  • September 18, 2009
  • 2 replies
  • 6 views

Forum|alt.badge.img+6

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

  • September 18, 2009

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

-Robert


Forum|alt.badge.img+31
  • Honored Contributor
  • September 18, 2009

In 10.5.8 I have the following handy binaries

/usr/sbin/cupsdisable

/usr/sbin/cupsenable