Bugzilla – Attachment 173596 Details for
Bug 36766
Add command-line utility to SFTP a file to a remote server
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 36766: (follow-up) Set ReplytoDefault as the preferred from_address of sftp_file.pl
Bug-36766-follow-up-Set-ReplytoDefault-as-the-pref.patch (text/plain), 1.92 KB, created by
Alex Buckley
on 2024-10-28 21:05:42 UTC
(
hide
)
Description:
Bug 36766: (follow-up) Set ReplytoDefault as the preferred from_address of sftp_file.pl
Filename:
MIME Type:
Creator:
Alex Buckley
Created:
2024-10-28 21:05:42 UTC
Size:
1.92 KB
patch
obsolete
>From 4e6499a73693b65f4d564c1910d49f5260b1aefe Mon Sep 17 00:00:00 2001 >From: Alex Buckley <alexbuckley@catalyst.net.nz> >Date: Tue, 29 Oct 2024 08:54:39 +1300 >Subject: [PATCH] Bug 36766: (follow-up) Set ReplytoDefault as the preferred > from_address of sftp_file.pl > >Default to KohaAdminEmailAddress if ReplytoDefault is not set > >Test plan: >1. Enter a valid email address into ReplytoDefault and > KohaAdminEmailAddress sysprefs > >2. Apply patch and restart services > >3. Generate a file on your Koha server. Place it in /tmp/test.mrc > >4. Manually connect to the SFTP remote host and accept the hostkey > >5. Enter Koha shell > >6. Run the sftp_file.pl command-line script >./sftp_file.pl --host <your remote hostname> --user <your user> --pass <your password> --upload_dir <your upload directory> --file /tmp/test.mrc --email <your email> > >7. Confirm the SFTP was successful > >8. Confirm that the email that you received has a from address matching the > ReplytoDefault syspref > >9. Empty out the ReplytoDefault syspref and repeat steps 5 and 6 > >10. Confirm that the new email you received has a from address matching > the KohaAdminEmailAddress syspref > >Sponsored-by: Catalyst IT >--- > misc/cronjobs/sftp_file.pl | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > >diff --git a/misc/cronjobs/sftp_file.pl b/misc/cronjobs/sftp_file.pl >index 526f9d48829..e769ac19147 100755 >--- a/misc/cronjobs/sftp_file.pl >+++ b/misc/cronjobs/sftp_file.pl >@@ -169,7 +169,9 @@ $sftp->setcwd($upload_dir) > # If the --email parameter is defined then prepare sending an email confirming the success > # or failure of the SFTP > if ($email) { >- if ( C4::Context->preference('KohaAdminEmailAddress') ) { >+ if ( C4::Context->preference('ReplytoDefault') ) { >+ $admin_address = C4::Context->preference('ReplytoDefault'); >+ } elsif ( C4::Context->preference('KohaAdminEmailAddress') ) { > $admin_address = C4::Context->preference('KohaAdminEmailAddress'); > } > >-- >2.39.2
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 36766
:
166085
|
166089
|
166471
|
166859
|
172151
|
172152
|
172153
|
172154
|
172161
|
172162
|
172163
|
172164
|
172176
|
172177
|
172178
|
172179
|
172180
|
172181
| 173596