Removing config info from z3950*sh and using C4::Context in processz3950queue (Fixed bug 39)
This commit is contained in:
parent
3f8a33ae70
commit
f31b394a03
5 changed files with 18 additions and 10 deletions
|
@ -84,7 +84,7 @@ if ($uploadmarc && length($uploadmarc)>0) {
|
|||
while (<$uploadmarc>) {
|
||||
$marcrecord.=$_;
|
||||
}
|
||||
my ($notmarcrecord,$alreadyindb,$alreadyinfarm,$imported) = ImportBreeding($marcrecord,$overwrite_biblio,$filename,$syntax);
|
||||
my ($notmarcrecord,$alreadyindb,$alreadyinfarm,$imported) = ImportBreeding($marcrecord,$overwrite_biblio,$filename,$syntax,int(rand(99999)));
|
||||
|
||||
$template->param(imported => $imported,
|
||||
alreadyindb => $alreadyindb,
|
||||
|
@ -103,6 +103,9 @@ my $file;
|
|||
#---------------
|
||||
# log cleared, as marcimport is (almost) rewritten from scratch.
|
||||
# $Log$
|
||||
# Revision 1.2 2003/10/06 09:10:38 slef
|
||||
# Removing config info from z3950*sh and using C4::Context in processz3950queue (Fixed bug 39)
|
||||
#
|
||||
# Revision 1.1 2003/06/04 13:46:25 tipaul
|
||||
# moving breeding farm import to parameters page (GUI) and to new import/ directory (code structure)
|
||||
#
|
||||
|
|
|
@ -1415,6 +1415,11 @@ opachtdocs=$opacdir/htdocs/opac-tmpl
|
|||
#MJR: does this contain any passwords?
|
||||
chmod 0755, "$intranetdir/scripts/z3950daemon/z3950-daemon-launch.sh", "$intranetdir/scripts/z3950daemon/z3950-daemon-shell.sh", "$intranetdir/scripts/z3950daemon/processz3950queue";
|
||||
|
||||
#MJR: generate our own settings, to remove the /home/paul hardwired links
|
||||
open(FILE,">$intranetdir/scripts/z3950daemon/z3950-daemon-options");
|
||||
print FILE "RunAsUser=apache\nKohaZ3950Dir=$intranetdir/scripts/z3950daemon\nKohaModuleDir=$intranetdir/modules\nLogDir=$kohalogdir\n";
|
||||
close(FILE);
|
||||
|
||||
if ($> == 0) {
|
||||
chown((getpwnam($httpduser)) [2,3], "$etcdir/koha.conf.tmp") or warn "can't chown koha.conf: $!";
|
||||
chown(0, (getpwnam($httpduser)) [3], "$intranetdir/scripts/z3950daemon/z3950-daemon-shell.sh") or warn "can't chown $intranetdir/scripts/z3950daemon/z3950-daemon-shell.sh: $!";
|
||||
|
|
|
@ -19,7 +19,7 @@ if ($< == 0) {
|
|||
close PID;
|
||||
}
|
||||
# Get real apacheuser from koha.conf or reparsing httpd.conf
|
||||
my $apacheuser='paul';
|
||||
my $apacheuser=C4::Context->config("httpduser");
|
||||
my $uid=0;
|
||||
unless ($uid = (getpwnam($apacheuser))[2]) {
|
||||
die "Attempt to run daemon as non-existent or superuser\n";
|
||||
|
|
|
@ -14,10 +14,7 @@
|
|||
# Needs SysV-type start/stop options
|
||||
|
||||
#----------------------------
|
||||
# User ID to run the daemon as. Don't use "root"
|
||||
RunAsUser=apache
|
||||
|
||||
KohaZ3950Dir=/home/paul/koha.dev/koha/z3950
|
||||
. z3950-daemon-options
|
||||
export KohaZ3950Dir
|
||||
|
||||
#----------------------------
|
||||
|
@ -41,6 +38,9 @@ exit
|
|||
|
||||
#--------------
|
||||
# $Log$
|
||||
# Revision 1.3 2003/10/06 09:10:39 slef
|
||||
# Removing config info from z3950*sh and using C4::Context in processz3950queue (Fixed bug 39)
|
||||
#
|
||||
# Revision 1.2 2003/04/29 16:48:25 tipaul
|
||||
# really proud of this commit :-)
|
||||
# z3950 search and import seems to works fine.
|
||||
|
|
|
@ -12,10 +12,7 @@
|
|||
# Call z3950-daemon-launch.sh instead
|
||||
|
||||
#----------------------------
|
||||
|
||||
KohaZ3950Dir=/home/paul/koha.dev/koha/z3950
|
||||
KohaModuleDir=/home/paul/koha.dev/koha
|
||||
LogDir=/tmp
|
||||
. z3950-daemon-options
|
||||
|
||||
#----------------------------
|
||||
LOGFILE=$LogDir/z3950-daemon-`date +%Y%m%d-%H%M`.log
|
||||
|
@ -41,6 +38,9 @@ exec $KohaZ3950Script $LogDir >>$LOGFILE 2>&1
|
|||
|
||||
#-------------------
|
||||
# $Log$
|
||||
# Revision 1.3 2003/10/06 09:10:39 slef
|
||||
# Removing config info from z3950*sh and using C4::Context in processz3950queue (Fixed bug 39)
|
||||
#
|
||||
# Revision 1.2 2003/04/29 16:48:25 tipaul
|
||||
# really proud of this commit :-)
|
||||
# z3950 search and import seems to works fine.
|
||||
|
|
Loading…
Reference in a new issue