Mailing List Archive

bric_queued --user
I'm using bric_queued for pub/dist with *bric_queued --username publisher
--password password*. Where publisher is a bric user I setup just for
handling scripted publishing tasks. Looking at the /etc/init.d/bricolage
startup script, I see it will also launch bric_queued at startup. However,
when I set the values:

DIST_USERNAME="publisher"
DIST_PASSWORD="password"

in that script and run:

% sudo /etc/init.d/bricolage start

I get this output:

Cannot open PID file /var/run/bric_queued.pid at /usr/local/bin/bric_queued
line 389.

[/usr/local/bin/bric_queued:424]
[/usr/local/bin/bric_queued:439]
[/usr/local/bin/bric_queued:226]
[/usr/local/bin/bric_queued:208]
bric_queued: started

Since, I'm running the startup script as root, I'm not sure what the problem
is. Perhaps the user *www-data*, is trying to launch bric_queued rather than
root, but does not have permission to write to /var/run? I'm just not sure.
Help!

ryan
Re: bric_queued --user [ In reply to ]
Of course after stating the problem I basically answered my own question.

The PID was being written to /var/run/bric_queued.pid, but as www-data and
without the proper permission to do so. This fixed the problem:

sudo mkdir /var/run/bricolage
sudo chown www-data\: /var/run/bricolage

Then updated DIST_PIDFILE=/var/run/bricolage/bric_queued.pid in the init.d
script. Works like a charm now.

ryan


On Fri, Jun 26, 2009 at 10:27 AM, Ryan O'Toole <rotoole@gmail.com> wrote:

> I'm using bric_queued for pub/dist with *bric_queued --username publisher
> --password password*. Where publisher is a bric user I setup just for
> handling scripted publishing tasks. Looking at the /etc/init.d/bricolage
> startup script, I see it will also launch bric_queued at startup. However,
> when I set the values:
>
> DIST_USERNAME="publisher"
> DIST_PASSWORD="password"
>
> in that script and run:
>
> % sudo /etc/init.d/bricolage start
>
> I get this output:
>
> Cannot open PID file /var/run/bric_queued.pid at /usr/local/bin/bric_queued
> line 389.
>
> [/usr/local/bin/bric_queued:424]
> [/usr/local/bin/bric_queued:439]
> [/usr/local/bin/bric_queued:226]
> [/usr/local/bin/bric_queued:208]
> bric_queued: started
>
> Since, I'm running the startup script as root, I'm not sure what the
> problem is. Perhaps the user *www-data*, is trying to launch bric_queued
> rather than root, but does not have permission to write to /var/run? I'm
> just not sure. Help!
>
> ryan
>
Re: bric_queued --user [ In reply to ]
On Jun 26, 2009, at 8:20 AM, Ryan O'Toole wrote:

> Of course after stating the problem I basically answered my own
> question.

I love when that happens. :-)

Best,

David