-$logdir = config_dir_relative(getconf($CNF_LOGDIR));
-$log_file = "$logdir/log";
-
-if ($erase) {
- # Check for log file existance
- if (-e $log_file) {
- `amcleanup -p $config_name`;
- }
-
- if (-e $log_file) {
- local *LOG;
- open(LOG, $log_file);
- my $info_line = <LOG>;
- close LOG;
- $info_line =~ /^INFO (.*) .* pid .*$/;
- my $process_name = $1;
- print "$process_name is running, or you must run amcleanup\n";
- exit 1;
- }
-}