r4904: sync up with 3.0 for 3.0.11pre2
[Samba.git] / examples / scripts / perl / smbdelprinter
blob30daf24b356ffed27b1290f3990a838165a7cb5a
1 #!/usr/bin/perl
2 ## Delete printer script for samba, APW, and cups
3 ## Copyright (C) Gerald (Jerry) Carter <jerry@samba.rog> 2004
4 ##
5 ## This program is free software; you can redistribute it
6 ## and/or modify it under the terms of the GNU General
7 ## Public License as published by the Free Software Foundation;
8 ## ither version 2 of the License, or (at your option) any
9 ## later version.
11 ## This program is distributed in the hope that it will be useful,
12 ## but WITHOUT ANY WARRANTY; without even the implied warranty of
13 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 ## GNU General Public License for more details.
16 ## You should have received a copy of the GNU General Public
17 ## License along with this program; if not, write to the Free
18 ## Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139,
19 ## USA.
21 @argv = @ARGV;
23 # take in args
24 my $lpname=shift(@argv); # printer name
26 system("/usr/sbin/lpadmin -x $lpname");