Skip to content

Commit fd0bffd

Browse files
committed
drop pulse worker supervisor if it exists and not configured
1 parent 0721a67 commit fd0bffd

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/Steps/Start/All/SyncPulseWorkerStep.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,18 @@ class SyncPulseWorkerStep implements RunsOnAws
1212
{
1313
public function __invoke(): StepResult
1414
{
15+
$file = sprintf('/etc/supervisor/conf.d/%s', Helpers::keyedResourceName('pulse-worker.conf'));
16+
1517
if (! Manifest::get('pulse-worker', false)) {
18+
if (file_exists($file)) {
19+
unlink($file);
20+
}
21+
1622
return StepResult::SKIPPED;
1723
}
1824

1925
file_put_contents(
20-
sprintf('/etc/supervisor/conf.d/%s', Helpers::keyedResourceName('pulse-worker.conf')),
26+
$file,
2127
str_replace(
2228
search: [
2329
'{NAME}',

0 commit comments

Comments
 (0)