- my $domain_record = qsearchs('domain_record', { 'recnum' => $self->recnum } ); # or die ?
- my $zone = $domain_record->reczone;
- # or die ?
- unless ( $zone =~ /\.$/ ) {
- my $dom_svcnum = $domain_record->svcnum;
- my $svc_domain = qsearchs('svc_domain', { 'svcnum' => $dom_svcnum } );
- # or die ?
- $zone .= $svc_domain->domain;
- }
-
- my $svc_acct = qsearchs('svc_acct', { 'svcnum' => $self->usersvc } );
- # or die ?
- my $username = $svc_acct->username;
- # or die ?
- my $homedir = $svc_acct->dir;
- # or die ?
-
- if ( $apachemachine
- && $apacheroot
- && $zone
- && $username
- && $homedir
- && ! $nossh_hack
- ) {
- ssh("root\@$apachemachine",
- "mkdir $apacheroot/$zone; ".
- "chown $username $apacheroot/$zone; ".
- "ln -s $apacheroot/$zone $homedir/$zone"
- );
- }
-