X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=bin%2Fsvc_acct_sm.export;h=bda17e332a1f9b28f32cc415f9951da4f8bcb208;hb=018f6678557506e68cc6b8643862143cc332f7da;hp=0893c94df4eea5ec3398839ffb8fb115c5d99615;hpb=bd26886dfcdb71027f0a3393993df383e72475b5;p=freeside.git diff --git a/bin/svc_acct_sm.export b/bin/svc_acct_sm.export index 0893c94df..bda17e332 100755 --- a/bin/svc_acct_sm.export +++ b/bin/svc_acct_sm.export @@ -1,6 +1,6 @@ #!/usr/bin/perl -Tw # -# $Id: svc_acct_sm.export,v 1.5 2000-07-03 09:03:14 ivan Exp $ +# $Id: svc_acct_sm.export,v 1.8 2000-07-06 03:37:24 ivan Exp $ # # Create and export config files for sendmail, qmail # @@ -42,7 +42,17 @@ # /var/spool/freeside/conf and sendmail updates ivan@sisd.com 98-aug-14 # # $Log: svc_acct_sm.export,v $ -# Revision 1.5 2000-07-03 09:03:14 ivan +# Revision 1.8 2000-07-06 03:37:24 ivan +# don't error out on invalid svc_acct_sm.domuid's that can't be matched in +# svc_acct.uid - just warn. +# +# Revision 1.7 2000/07/03 09:13:10 ivan +# get rid of double sendmailrestart invocation; no need for multiple sessions +# +# Revision 1.6 2000/07/03 09:09:14 ivan +# typo +# +# Revision 1.5 2000/07/03 09:03:14 ivan # added sendmailrestart and sendmailconfigpath config files # # Revision 1.4 2000/06/29 14:02:29 ivan @@ -77,7 +87,7 @@ if ( $conf->exists('qmailmachines') ) { } my(@sendmailmachines, $sendmailconfigpath, $sendmailrestart); -if $conf->exists('sendmailmachines') { +if ( $conf->exists('sendmailmachines') ) { @sendmailmachines = $conf->config('sendmailmachines'); $sendmailconfigpath = $conf->config('sendmailconfigpath') || '/etc'; $sendmailrestart = $conf->config('sendmailrestart'); @@ -139,6 +149,11 @@ foreach $svc_acct_sm ( qsearch('svc_acct_sm') ) { ); my($domain)=$domain{$domsvc}; my($svc_acct)=qsearchs('svc_acct',{'uid'=>$domuid}); + unless ( $svc_acct ) { + warn "WARNING: couldn't find svc_acct.uid $domuid (svc_acct_sm.svcnum ". + $svc_acct_sm->svcnum. ") - corruped database?\n"; + next; + } my($username,$dir,$uid,$gid)=( $svc_acct->username, $svc_acct->dir, @@ -204,10 +219,6 @@ foreach $sendmailmachine (@sendmailmachines) { " )" ) == 0 or die "ssh error: $!"; - if ( $conf->config('sendmailrestart') ) { - ssh("root\@$sendmailmachine", $conf->config('sendmailrestart') ) - == 0 or die "ssh error: $!"; - } } my($qmailmachine);