use Net::FTP;
use Socket qw( PF_INET AF_INET SOCK_STREAM );
use Config;
+use Sys::Hostname;
# ---------------------------------------------------------------------------
# configuration
( $main::progname = $0 ) =~ s,.*/,,;
+($main::hostname, undef, undef, undef, undef) = gethostbyname(hostname());
+
my %packages = ();
# extract -r and -k args
POSIX::sigsuspend($sigset);
waitpid( $pid, WNOHANG );
if ( kill( 0, $pid ) ) {
- print "Daemon started in background (pid $pid)\n";
+ print "Daemon (on $main::hostname) started in background (pid $pid)\n";
exit 0;
} else {
exit 1;
do {
my $version;
- ( $version =
-'Release: 0.9 $Revision: 1.51 $ $Date: 1999/07/08 09:43:21 $ $Author: ftplinux $'
- ) =~ s/\$ ?//g;
+ ( $version = 'Release: 0.95' ) =~ s/\$ ?//g;
print "debianqueued $version\n";
};
or die "$main::progname: Can't redirect stderr to $conf::logfile: $!\n";
# ok, from this point usually no "die" anymore, stderr is gone!
-msg( "log", "daemon (pid $$) started\n" );
+msg( "log", "daemon (pid $$) (on $main::hostname) started\n" );
# initialize variables used by send_status before launching the status daemon
$main::dstat = "i";
}
$message .= "\n$text";
- $message .= "\nGreetings,\n\n\tYour Debian queue daemon\n";
+ $message .= "\nGreetings,\n\n\tYour Debian queue daemon (running on host $main::hostname)\n";
my $mail = Email::Send->new;
for (qw[Sendmail SMTP]) {