X-Git-Url: https://git.treefish.org/fex.git/blobdiff_plain/e60096926213ce02293a261254ff065cae44c1c8..97b87610331f53e756d032ad21db786037f921a1:/install diff --git a/install b/install index 9c49c06..a34adf1 100755 --- a/install +++ b/install @@ -63,8 +63,10 @@ if (not $ip and open P,'host $(hostname)|') { } } close P; - print "Your IP [$guessed_ip] : "; - chomp($ip = ); + unless (-f $xinetd) { + print "Your IP [$guessed_ip] : "; + chomp($ip = ); + } $ip ||= $guessed_ip; } @@ -211,6 +213,14 @@ if (-d "$FEXHOME/spool") { } chownr('fex',"$FEXHOME/spool/."); +# fex-VM? +if (open my $setup,'/root/bin/setup') { + while (<$setup>) { + exit if /#.*X-VM/; + } + close $setup; +} + system(qw'perl -p -i -e', 's:href="/?FAQ.html":href="/FAQ/FAQ.html":', "$FEXHOME/lib/fup.pl" @@ -226,7 +236,8 @@ close $fph; eval $conf; -die "no \$spooldir in $fph\n" unless $spooldir; +# die "no \$spooldir in $fph\n" unless $spooldir; +$spooldir ||= '/home/fex/spool'; die "\$spooldir=$spooldir is not a directory, see $fph\n" unless -d $spooldir; symlink $spooldir,"$FEXHOME/spool" unless -e "$FEXHOME/spool"; @sds1 = stat "$spooldir/."; @@ -256,6 +267,7 @@ if ($newinstall or not -s $aa) { last if $admin =~ /.\@./; print "admin must be a valid email address!\n"; } + $aa = "$spooldir/$admin/@"; while (not $admin_pw) { print "F*EX admin password: "; $admin_pw = ; @@ -353,12 +365,13 @@ unless (-f $xinetd) { if ($crontab !~ /fex_cleanup/) { open $crontab,">fex.cron" or die "cannot create fex.cron - $!\n"; print {$crontab} $crontab,"\n"; + print {$crontab} " 3 2 * * * exec $FEXHOME/bin/backup\n"; print {$crontab} " 3 3 * * * exec $FEXHOME/bin/fex_cleanup\n"; close $crontab; - system qw(crontab -u fex fex.cron); + system qw'crontab -u fex fex.cron'; } - chownr('fex:root',"$FEXHOME $FEXHOME/spool/."); + chownr('fex:root',$FEXHOME,"$FEXHOME/spool/."); chmodr('go-r',"$FEXHOME/lib","$FEXHOME/cgi-bin","$FEXHOME/spool/."); print "\n";