Jump to content
C4 Forums | Control4

accessing files stored on C4-CA10 from Synology NAS


BDavisNJ

Recommended Posts

does anyone know how to script a  #!/bin/bash instruction to move files from a C4 controller to a hard drive?

Specifically, I am looking to have my Synology NAS drive run a scheduled script to move some Chowmain Events files to a location on my NAS.  I have tried dozens of variations and I cannot get the script to find the files on the C4 controller. This effort is to address an issue in which Chowmain SMTP driver does not permit attachments above a certain size.

An alternative solution would be to recommend a SMTP driver that permits attachments greater than 1mb.

I am running the script as user Admin.  I have tried:
#!/bin/bash
NOW=$(date +%m%d%y)
cp 192.168.57.96:/log/debug/chowmain_event_logger.log "Rodger_Wattkins/DiskC/Computer and Technology/Control4/C4 backups/log files/${NOW}"

 

Thank you

Edited by BDavisNJ
changes maximum file size
Link to comment
Share on other sites


Because cp is really only used for the local system, not for directly grabbing files across a network (that's where you use scp). You could first create a mountpoint to the controller and then do a cp but that is more work. However, since the controller is running samba and the folder permissions are open, it should make matters quite simple.

If you have the smbget package, i'd do smbget smb://192.168.57.96/log/debug/chowmain_event_logger.log in the directory of choice. You can create the folder in advance of the script.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.