Use a default location for spectre.pid, tweak the gotchas text. Addresses bug #10822.

This commit is contained in:
Colin Kuskie 2009-08-24 20:21:37 +00:00
parent 9442227ce8
commit 4c0f971699
3 changed files with 17 additions and 10 deletions

View file

@ -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

View file

@ -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

View file

@ -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 "/";