| Summary: | net-mgmt/seafile-server Initscript only does not work when executed with service | ||||||
|---|---|---|---|---|---|---|---|
| Product: | Ports & Packages | Reporter: | alex.theissen | ||||
| Component: | Individual Port(s) | Assignee: | Richard Gallamore <ultima> | ||||
| Status: | Closed Overcome By Events | ||||||
| Severity: | Affects Some People | CC: | 000.fbsd, Ultima1252 | ||||
| Priority: | --- | Keywords: | needs-patch | ||||
| Version: | Latest | Flags: | Ultima1252:
maintainer-feedback+
koobs: merge-quarterly? |
||||
| Hardware: | Any | ||||||
| OS: | Any | ||||||
| Attachments: |
|
||||||
|
Description
alex.theissen
2016-10-31 16:36:08 UTC
(In reply to alex.theissen from comment #0) I think it is related to PATH or other env variables. /usr/sbin/service is using clean env: exec env -i HOME=/ PATH=/sbin:/bin:/usr/sbin:/usr/bin $dir/$script $* rc.d/seafile have defined function prepare_env() { export PATH=${seafile_path}/seafile/bin:$PATH export LD_LIBRARY_PATH=${seafile_path}/seafile/lib/:${seafile_path}/seafile/lib64:${LD_LIBRARY_PATH} } But this function is never called. I am not using seafile so I can't test it. This is actually a bug, ccnet-server binary reading the config in the old/incorrect directory. I suggest linking you're conf to the old directory as a workaround. If memory serves me correctly this was already fixed upstream, the reason updates have halted is due to server and client repos being split and still making decisions on the matter. # ln -s /usr/local/www/haiwen/conf/ccnet.conf /usr/local/www/haiwen/ccnet/ After taking another quick look, this bug is odd, others have messaged me about it and when diving in found missing haiwen/ccnet/ccnet.conf file will reproduced this error. After removing it just now, it is starting correctly with service... Ill have another go at it tomorrow. Maybe some sort of race condition? Also i'll check the env function as it is unused code. Created attachment 176686 [details]
rc.d/seafile
Having a hard time reproducing this issue. Added env to the program start up as suggested by Miroslav Lachman. Can you please test it? Thanks.
Added prepare_env() as first call in seafile_start() in /usr/local/etc/rc.d/seafile. Now it is working. (In reply to alex.theissen from comment #5) Have an update that I will be posting soon with this function added as suggested. There will be a new port for ccnet/seafile as the client and server has been split so hopefully it doesn't take to much time for the new ports to get into repo. Update Summary with new port name and assign to maintainer. This should be fixed in an update several months ago. If the issue persists, please reopen. |