Fixing fast error with gts bot pid not existing.

This commit is contained in:
sergiotarxz 2024-05-06 21:51:24 +02:00
parent 72e7459492
commit 4ba198be51

View File

@ -61,7 +61,7 @@ sub startup ($self) {
my $gts_bot_pid = path('last_pid_started_gts_bot'); my $gts_bot_pid = path('last_pid_started_gts_bot');
if (-f $pidfile) { if (-f $pidfile) {
my $pidfile_content = $pidfile->slurp; my $pidfile_content = $pidfile->slurp;
if ($pidfile_content eq $gts_bot_pid->slurp) { if (-f $gts_bot_pid && $pidfile_content eq $gts_bot_pid->slurp) {
return; return;
} }
$gts_bot_pid->spew($pidfile_content); $gts_bot_pid->spew($pidfile_content);