use FS::SSH qw(ssh);
use FS::part_svc;
use FS::svc_acct_pop;
+use FS::svc_acct_sm;
@ISA = qw( FS::svc_Common );
$self->shell,
);
if ( $username && $uid && $dir && $shellmachine && ! $nossh_hack ) {
- ssh("root\@$shellmachine", eval "$useradd");
+ ssh("root\@$shellmachine", eval qq("$useradd") );
}
''; #no error
my $self = shift;
my $error;
+ return "Can't delete an account which has mail aliases pointed to it!"
+ if $self->uid && qsearch( 'svc_acct_sm', { 'domuid' => $self->uid } );
+
local $SIG{HUP} = 'IGNORE';
local $SIG{INT} = 'IGNORE';
local $SIG{QUIT} = 'IGNORE';
$self->dir,
);
if ( $username && $shellmachine && ! $nossh_hack ) {
- ssh("root\@$shellmachine", eval "$userdel");
+ ssh("root\@$shellmachine", eval qq("$userdel") );
}
'';
$new->getfield('gid'),
);
if ( $old_dir && $new_dir && $old_dir ne $new_dir && ! $nossh_hack ) {
- ssh("root\@$shellmachine", eval "$usermod" );
+ ssh("root\@$shellmachine", eval qq("$usermod") );
}
''; #no error
=head1 VERSION
-$Id: svc_acct.pm,v 1.11 2000-07-17 10:37:27 ivan Exp $
+$Id: svc_acct.pm,v 1.13 2000-07-17 13:51:07 ivan Exp $
=head1 BUGS