Bug 122741 - Cannot restart net-im/openfire from cron
Summary: Cannot restart net-im/openfire from cron
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Tom McLaughlin
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-04-14 06:30 UTC by admin
Modified: 2008-04-18 03:00 UTC (History)
0 users

See Also:


Attachments
file.diff (752 bytes, patch)
2008-04-14 06:30 UTC, admin
no flags Details | Diff
openfire.diff (410 bytes, patch)
2008-04-14 11:29 UTC, Nikolay Pavlov
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description admin 2008-04-14 06:30:01 UTC
Two problems:
1. Cannot restart openfire using command:
3       3       *       *       6       /usr/local/etc/rc.d/openfire stop && sleep 10 && /usr/local/etc/rc.d/openfire start
because not all utilities contains in default PATH cron daemon

2. Not reading starup script otions
openfire_javargs=""
from /etc/rc.conf

Fix: see patch

Patch attached with submission follows:
How-To-Repeat: restart openfire from cron using
/usr/local/etc/rc.d/openfire stop && sleep 10 && /usr/local/etc/rc.d/openfire start
==========
set another value "openfire_javargs" in rc.conf and restart openfire:
openfire_javargs="-Xmx1536M"
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2008-04-14 07:13:42 UTC
State Changed
From-To: open->feedback

Awaiting maintainers feedback (via the GNATS Auto Assign Tool)
Comment 2 Nikolay Pavlov 2008-04-14 11:29:47 UTC
I want to confirm the second problem the attached patch should fix it.
However i can't confirm the first one.
The deafult crontab do contain the required PATH at least for the last 7 
years. See the:
http://www.freebsd.org/cgi/cvsweb.cgi/src/etc/crontab

-- 
======================================================================  
- Best regards, Nikolay Pavlov. <<<-----------------------------------    
======================================================================  
Comment 3 admin 2008-04-14 12:06:22 UTC
may be you test before send ansver?

string:
3       15      *       *       *       env; /usr/local/etc/rc.d/openfire stop && sleep 10 && /usr/local/etc/rc.d/openfire start
to root come mail contains:
USER=root
HOME=/root
LOGNAME=root
PATH=/usr/bin:/bin
SHELL=/bin/sh
Stopping openfire.
Waiting for PIDS: 73544, 73544, 73544, 73544, 73544, 73544, 73544, 73544, 73544, 73544, 73544, 73544, 73544, 73544, 73544, 73544, 73544, 73544.
chown: not found
Comment 4 Nikolay Pavlov 2008-04-14 17:11:45 UTC
On Monday 14 April 2008 14:06:22 Alex Keda wrote:
> may be you test before send ansver?
>
> string:
> 3       15      *       *       *       env;
> /usr/local/etc/rc.d/openfire stop && sleep 10 &&
> /usr/local/etc/rc.d/openfire start to root come mail contains:
> USER=root
> HOME=/root
> LOGNAME=root
> PATH=/usr/bin:/bin
> SHELL=/bin/sh
> Stopping openfire.
> Waiting for PIDS: 73544, 73544, 73544, 73544, 73544, 73544, 73544,
> 73544, 73544, 73544, 73544, 73544, 73544, 73544, 73544, 73544, 73544,
> 73544. chown: not found

Ok. We've discussed the issue with Alex at private email and the conclusion 
is that my patch for the second problem is reasonable. The first problem 
is not related to my rc script. It is related to how cron manage personal 
crontab files in /var/cron/tabs
Edwin please commit my patch-2.diff

-- 
======================================================================  
- Best regards, Nikolay Pavlov. <<<-----------------------------------    
======================================================================
Comment 5 Tom McLaughlin freebsd_committer freebsd_triage 2008-04-18 02:52:40 UTC
State Changed
From-To: feedback->closed

I've commited the second patch.  Thanks. 


Comment 6 Tom McLaughlin freebsd_committer freebsd_triage 2008-04-18 02:52:40 UTC
Responsible Changed
From-To: freebsd-ports-bugs->tmclaugh
Comment 7 dfilter service freebsd_committer freebsd_triage 2008-04-18 02:58:56 UTC
tmclaugh    2008-04-18 01:58:48 UTC

  FreeBSD ports repository

  Modified files:
    net-im/openfire      Makefile 
    net-im/openfire/files openfire.in 
  Log:
  Fix startup script so openfire_javargs are respected.
  
  PR:             122741
  Approved by:    maintainer
  
  Revision  Changes    Path
  1.17      +1 -1      ports/net-im/openfire/Makefile
  1.3       +2 -1      ports/net-im/openfire/files/openfire.in
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"