diff --git a/docs/changelog/7.x.x.txt b/docs/changelog/7.x.x.txt index 6fcbf1f4c..2eabdbc83 100644 --- a/docs/changelog/7.x.x.txt +++ b/docs/changelog/7.x.x.txt @@ -1,4 +1,5 @@ 7.7.19 + - fixed #10822: spectre pid sucks - fixed #10817: Datatable not internationalized - fixed #10816: Minor Capitalization Issue - fixed #10814: matrix translations diff --git a/docs/gotcha.txt b/docs/gotcha.txt index e2a969aa9..a6b70c879 100644 --- a/docs/gotcha.txt +++ b/docs/gotcha.txt @@ -41,16 +41,20 @@ save you many hours of grief. will cause an error during the 7.6.32 upgrade. Later versions of these modules should work. - * Spectre now works like many other programs and writes a PID - file. The location of that file is required to be in your - spectre.conf file: + * Spectre now works like many other programs and uses a PID + file. By default, it will use /var/run/spectre.pid, but you + can change that in your spectre.conf file: # The location of the file that keeps track of the master spectre # processId. -"pidFile" : "/var/run/spectre.pid", ##or /data/wre/var/logs, or someplace else +"pidFile" : "/data/wre/var/logs/spectre.pid", After installing this version, you will need to manually kill - spectre, but it can be started again through the spectre script. + spectre: + + killall spectre.pl + + before starting it again. * The Default Gallery Album View Thumbnails template has been reworked to get rid of intermittent rendering bugs with IE7. The thumbnail diff --git a/sbin/spectre.pl b/sbin/spectre.pl index 2781ff067..1bdf3d10c 100755 --- a/sbin/spectre.pl +++ b/sbin/spectre.pl @@ -71,7 +71,8 @@ if ($shutdown) { local $/; my $pidFileName = $config->get('pidFile'); if (! $pidFileName) { - die "No pidFile specified in spectre.conf\n"; + warn "No pidFile specified in spectre.conf, trying /var/run/spectre.pid\n"; + $pidFileName = '/var/run/spectre.pid'; } open my $pidFile, '<', $pidFileName or die "Unable to open pidFile ($pidFileName) for reading: $!\n"; @@ -101,6 +102,11 @@ elsif ($run) { } elsif ($daemon) { my $pidFileName = $config->get('pidFile'); + ##Write the PID file + if (! $pidFileName) { + warn "No pidFile specified in spectre.conf. Trying /var/run/spectre.pid instead\n"; + $pidFileName = '/var/run/spectre.pid'; + } if (!ping()) { die "Spectre is already running.\n"; } @@ -111,10 +117,6 @@ elsif ($daemon) { require POSIX; fork and exit; POSIX::setsid(); - ##Write the PID file - if (! $pidFileName) { - die "No pidFile specified in spectre.conf\n"; - } open my $pidFile, '>', $pidFileName or die "Unable to open pidFile ($pidFileName) for writing: $!\n"; chdir "/";