diff options
Diffstat (limited to 'bin/cust_pkg-remove_setup')
-rwxr-xr-x | bin/cust_pkg-remove_setup | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/bin/cust_pkg-remove_setup b/bin/cust_pkg-remove_setup new file mode 100755 index 000000000..58dc6b9b6 --- /dev/null +++ b/bin/cust_pkg-remove_setup @@ -0,0 +1,26 @@ +#!/usr/bin/perl + +use strict; +use FS::UID qw( adminsuidsetup ); +use FS::Record qw( qsearchs ); +use FS::cust_pkg; + +my $user = shift or &usage; +adminsuidsetup $user; + +my $pkgnum = shift or &usage; + +my $cust_pkg = qsearchs('cust_pkg', { 'pkgnum' => $pkgnum } ) + or die "unknown pkgnum $pkgnum\n"; + +$cust_pkg->setup(''); +my $error = $cust_pkg->replace; + +die $error if $error; + +sub usage { + die "usage: cust_pkg-remove_setup employee_username pkgnum\n"; +} + +1; + |