|
Post by getmythe on Jan 4, 2007 4:28:48 GMT 7
For all those tweakers who do not want to write a complete module just for a few lines of shell script code; have a look at the meta module! For now the description found on the options page (see screenshot) is all the documentation there is. I hope it's clear enough. www.freeside.ch/thecus/META.mod.tgzhave fun getmythe
|
|
|
Post by getmythe on Jan 6, 2007 2:34:33 GMT 7
The infrastructure is there, here is now a first bunch of scripts: - itunes-rescan_interval.sh (simplified version of the one delivered in the module)
- mount_any_usbdrive.sh (idea copied from user omega and his N5200 module)
- logevent_email_address.sh (just edit the script and fill in your own email address)
www.freeside.ch/thecus/metaScripts.tar.gzhave fun getmythe
|
|
|
Post by getmythe on Jan 9, 2007 1:49:07 GMT 7
META module version 1.1.00 has been uploaded to the Thecus Wiki. Please backup your own startup/shutdown scripts before upgrading. Version 1.1.00 behaves the same way as 1.0.00 but does now contain a backup procedure which allows future upgrades without loosing your scripts. The module archive contains two new scripts - force_webdisk_login.sh : only allow logged in user to see contents of WebDisk and iTunes
- disable_anon_ftp_access.sh : disable anonymous login via ftp
The updated META module is available via www.freeside.ch/thecus/N2100-META-1.1.01.tgz, The latest scripts as stand alone download via www.freeside.ch/thecus/metaScripts.tar.gz.
|
|
|
Post by getmythe on Jan 9, 2007 1:52:03 GMT 7
If you wrote your own script for META, please do not hesitate to post it in this thread
|
|
bryzi
New Member
Posts: 5
|
Post by bryzi on Jan 13, 2007 5:16:46 GMT 7
Hi, I've just bought a Thecus 2100 and found this site. I'm not really a Linux person but am learning quickly so I can get the most out of it This module is very useful indeed. I had problems connecting to the FTP server behind my NAT in PASV mode as it uses random ports. To solve this I have limited the FTP data port range to some ports of my choosing. e.g. main port = 21 data ports = 2100 -> 2110 This allows me to add a simple forwarding rule for a limited port range rather than forwarding almost every high port to the thecus which isn't really a good idea. My NAT isn't that clever so doesn't filter FTP traffic very well. Anyway, I modified the disable_anon_ftp_access.sh script and changed... sed -i 's/AHM/AEH/app/bin/rc/rc.ftpd to sed -i 's/-AHM/-AEH -p 2100:2110 /app/bin/rc/rc.ftpd ...and after forwarding 21 & 2100->2110 to the thecus I can now FTP from the net using PASV mode. Hooray! Keep up the good work!! Thanks, Bryan
|
|
|
Post by getmythe on Jan 25, 2007 5:15:12 GMT 7
I updated the webdisk login enforcement script and added a companion, the gallery login enforcer - force_gallery_login.sh : only allow logged in user to see contents of Photo Gallery
- force_webdisk_login.sh : only allow logged in user to see contents of WebDisk and iTunes
These additions are currently only available via www.freeside.ch/thecus/metaScripts.tar.gz
|
|
|
Post by getmythe on Feb 5, 2007 3:54:43 GMT 7
Both login enforcement scripts have been updated (force_gallery_login.sh, force_webdisk_login.sh). They will now present a login screen instead of a warning if you failed to authenticate beforehand. See above for dl location.
|
|
|
Post by getmythe on Feb 5, 2007 4:20:14 GMT 7
A quick method to create (and of course also restore) backups of individual folders: onebtn_backup.sh- prerequisite: SSH and RSYNC module plus usbhdd preferably formatted with ext3
- create a file called onebtn.backup in the root folder of any usbhdd partition
- file onebtn.backup is to contain one directory name per line incl full path
- create a backup by pushing the copy button on front of thecus n2100
- alternatively create a backup by calling script with argument 'backup'
- restore backup by calling script with argument 'restore'
- after a backup/restore the usbhdd will be unmounted
The copy button will keep it's original functionality. Whenever file onebtn.backup is found on one of the mounted usbhdd partitions a backup will be performed instead of a regular copy operation. have fun, getmythe
|
|
krunk
New Member
Posts: 26
|
Post by krunk on Feb 6, 2007 4:06:41 GMT 7
Hi, sorry, but can you please explain how to execute a startup script? I've installed the module, but now? How can I add another script to startup.
|
|
|
Post by getmythe on Feb 6, 2007 5:47:24 GMT 7
To install additional scripts you'll need the SSH module plus some ssh client software on your PC (Putty) or LinuxBox/Mac (ssh within terminal). Please search this forum if you need more help with the SSH module. The next step is to copy script repository metaScripts.tar.gz to your iTunes share (or any other share you happen to have). After logging into your Thecus via ssh unpack the archive with tar zxf /raid/iTunes/metaScripts.tar.gz Now copy the scripts you need to META, e.g. in case you want to disable anonymous ftp logins you would type cp metaScripts/startup/disable_anon_ftp_access.sh /raid/module/META/startup/ That's it! On the next reboot the script will be activated. I hope that's detailed enough
|
|
|
Post by omega on Feb 6, 2007 5:54:07 GMT 7
Hello getmythe,
what do you think about exporting /raid/module/META/{startup,shutdown} or even /raid/module/META via NFS and CIFS. Then users can just mount that directory and place the start/stop scripts using their explorer or something equivalent without needing SSH.
Just an idea....
Andreas
|
|
|
Post by getmythe on Feb 6, 2007 19:35:46 GMT 7
Hi omega,
exporting via CIFS is not an option, NFS could be a possibility. The issue I see is that shell scripts have to be executable and preferably belong to user root. That's tricky to do with exports. Even if these two issues are solved I would probably still not do it as I consider a mount of /raid/module/META a major security hazard.
Maybe scp or sftp would be a better option than ssh. No security hazard and still relatively easy to use.
cheers getmythe
|
|
krunk
New Member
Posts: 26
|
Post by krunk on Feb 7, 2007 17:37:27 GMT 7
Ok, thnx. Installation of FTP fix and Email fix have been done, Email is still not working, but I'll test some more on that
|
|
tox
New Member
Posts: 2
|
Post by tox on Mar 7, 2007 3:02:57 GMT 7
Hi, I've just bought a Thecus 2100 and found this site. I'm not really a Linux person but am learning quickly so I can get the most out of it This module is very useful indeed. I had problems connecting to the FTP server behind my NAT in PASV mode as it uses random ports. To solve this I have limited the FTP data port range to some ports of my choosing. e.g. main port = 21 data ports = 2100 -> 2110 This allows me to add a simple forwarding rule for a limited port range rather than forwarding almost every high port to the thecus which isn't really a good idea. My NAT isn't that clever so doesn't filter FTP traffic very well. Anyway, I modified the disable_anon_ftp_access.sh script and changed... sed -i 's/AHM/AEH/app/bin/rc/rc.ftpd to sed -i 's/-AHM/-AEH -p 2100:2110 /app/bin/rc/rc.ftpd ...and after forwarding 21 & 2100->2110 to the thecus I can now FTP from the net using PASV mode. Hooray! Keep up the good work!! Thanks, Bryan Hello, i need your help. the script doesn't work thank you
|
|
bryzi
New Member
Posts: 5
|
Post by bryzi on Mar 10, 2007 6:36:52 GMT 7
Hello, i need your help. the script doesn't work thank you I just made a slight tweak to the original script to add the option for a restricted port range. If you have made this change then restarting the thecus should be enough. If you have a router then this needs to forward the port range 2100->2100 and the connection port which is usually 21 to the Thecus. Then as long as you're FTP client is using PASV mode it should work ok.
|
|