morbidpete

Members
  • Posts

    142
  • Joined

  • Last visited

Everything posted by morbidpete

  1. It appears that you may have carriage returns in this script. Linux does not like carriage returns. Use an editor that is Linux compatible and uses line feeds to terminate lines. The "fi" at the end does not have a corresponding "if". thnaks for the tips. I am using Notepad++ and set the language to "shell" I am no longer using the code posted above.
  2. Check your script syntax. I think the "ii" might need to be "done", or is not supposed to be there. There doesn't seem to be an "if". #!/bin/bash # Copy MP3 files in a directory to a new name based solely on creation date # FROM: foo.mp3 Created on: 2012-04-18 18:51:44 # TO: 20120418_185144.mp3 for r in *.MOV do # mod_date=$(stat -c "%y" "$r"|sed 's/\..*$//') # mod_date=$(stat -c "%y" "$r"|awk '{print $1"_"$2}'|sed 's/\..*$//') mod_date=$(stat --format %y "$r"|awk '{print $1"_"$2}'|cut -f1 -d'.'|sed 's/[: -]//g') mv "$r" "$mod_date$r" done the script i found as i found it. just changed for my needs. this is working when running "rename.sh" i tried adding the dir to the path variable in the main script and adding the line ./rename.sh also tried exec /mnt/user/Drone/Dump/rename.sh and source rename.sh and source /mnt/user/Drone/Dump/rename.sh i changed the for i in to for r in because i was used in the original script all without luck :-(
  3. google cloud drive would be clutch. just grabbed a year of unlimited for $5. I have no idea what to do with it
  4. some more testing. after putting just the rename script in the option. nogo. works just fine from putty. but not with the mount script
  5. ok, been working on this for a bit with a ton of googling i have this script that does exactly what i want it to do for r in ${DESTINATION}/*.MOV; do mod_date=$(stat --format %y "$i"|awk '{print $1"_"$2}'|cut -f1 -d'.'|sed 's/[: -]//g') cp "$i" "$mod_date$i" done fi tested on some test files and works just great. I tried 2 ways to use this I tried to insert that script test into the script provided in the first page. but no matter where I place the code it breaks the whole script. I also tried calling up the script at the end of the sample script using /bin/bash /mnt/blah/blah/rename.sh again with no luck. can anyone tell me how i can get this script to run either from within the demo script or to be called after the demo is done here is the demo from page 1 that is working beautifully #!/bin/bash PATH=/usr/local/sbin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin:/bin ## Usage (after configuration): ## 1. Insert camera's memory card into USB card reader on unRAID system. ## 2. This script will automatically move (or copy) any images/videos from the memory card to the array. ## If jhead was installed, it will automaticaly rotate images according to the exif data too. ## 3. Wait for the imperial theme to play, then remove the memory card. ## Preparation: ## 1. Install jhead (to automatically rotate photos) by downloading this file: ## http://www.slackware.com/~alien/slackbuilds/jhead/pkg64/13.37/jhead-2.90-x86_64-1alien.tgz ## and placing it in /boot/extra/ . Then reboot or run: ## installpkg jhead-2.90-x86_64-1alien.tgz ## 2. Install the "Auto Mount USB Mass Storage Devices" plugin for unRAID from: ## http://lime-technology.com/forum/index.php?topic=38635.msg360355 ## 3. Use that plugin to set this script to run when a memory card is inserted ## 4. Configure variables in this script as described below ## --- BEGIN CONFIGURATION --- ## SET THIS FOR YOUR CAMERAS: ## array of directories under /DCIM/ that contain files you want to move (or copy) ## can contain regex VALIDDIRS=("/DCIM/[0-9][0-9][0-9]___[0-9][0-9]" "/DCIM/[0-9][0-9][0-9]CANON" "/DCIM/[0-9][0-9][0-9]_FUJI" "/DCIM/100MEDIA") ## SET THIS FOR YOUR SYSTEM: ## location to move files to. use date command to ensure unique dir DESTINATION="/mnt/user/Drone/Dump/" ## SET THIS FOR YOUR SYSTEM: ## change to "move" when you are confident everything is working MOVE_OR_COPY="copy" ## set this to 1 and check the syslog for additional debugging info DEBUG="1" ## --- END CONFIGURATION --- ## Available variables: # AVAIL : available space # USED : used space # SIZE : partition size # SERIAL : disk serial number # ACTION : if mounting, ADD; if unmounting, REMOVE # MOUNTPOINT : where the partition is mounted # FSTYPE : partition filesystem # LABEL : partition label # DEVICE : partition device, e.g /dev/sda1 beep_imperial() { for i in $(seq 1 ${1}); do beep -f 392 -l 450 -r 3 -D 150 -n -f 311.13 -l 400 -D 50 \ -n -f 466.16 -l 100 -D 50 -n -f 392 -l 500 -D 100 \ -n -f 311.13 -l 400 -D 50 -n -f 466.16 -l 100 -D 50 \ -n -f 392 -l 600 -D 600 -n -f 587.33 -l 450 -r 3 -D 150 \ -n -f 622.25 -l 400 -D 50 -n -f 466.16 -l 100 -D 50 \ -n -f 369.99 -l 500 -D 100 -n -f 311.13 -l 400 -D 50 \ -n -f 466.16 -l 100 -D 50 -n -f 392 -l 500 -D 100 sleep 2 done } case $ACTION in 'ADD' ) if [ ${DEBUG} ]; then logger "USB: beginning ADD action"; fi RSYNCFLAG="" MOVEMSG="copying" if [ ${MOVE_OR_COPY} == "move" ]; then RSYNCFLAG=" --remove-source-files " MOVEMSG="moving" fi # only operate on USB disks that contain a /DCIM directory, everything else will simply be mounted if [ -d "${MOUNTPOINT}/DCIM" ]; then if [ ${DEBUG} ]; then logger "USB: ${MOUNTPOINT}/DCIM exists"; fi # loop through all the subdirs in /DCIM looking for dirs defined in VALIDDIRS for DIR in ${MOUNTPOINT}/DCIM/*; do if [ -d "${DIR}" ]; then if [ ${DEBUG} ]; then logger "USB: checking ${DIR}"; fi for element in "${VALIDDIRS[@]}"; do if [[ ${DIR} =~ ${element} ]]; then # process this dir logger "USB: ${MOVEMSG} ${DIR} to ${DESTINATION}" rsync -a ${RSYNCFLAG} "${DIR}/" "${DESTINATION}" # remove empty directory from memory card if [ ${MOVE_OR_COPY} == "move" ]; then rmdir ${DIR} fi fi done fi done # files were moved (or copied). unmount USB drive, fix permissions, and rotate images if [ -d "${DESTINATION}" ]; then if [ ${DEBUG} ]; then logger "USB: destination created"; fi /usr/local/sbin/usb_umount $DEVICE newperms "${DESTINATION}" if [ -e "/usr/bin/jhead" -a -e "/usr/bin/jpegtran" ]; then if [ ${DEBUG} ]; then logger "USB: about to run jhead"; fi jhead -autorot -ft "${DESTINATION}"/*.[jJ][pP][gG] fi beep_imperial 1 & # it is now safe to remove the USB drive and review the files that were moved (or copied) fi fi if [ ${DEBUG} ]; then logger "USB: completed ADD action"; fi ;; 'REMOVE' ) if [ ${DEBUG} ]; then logger "USB: beginning REMOVE action"; fi ;; esac
  6. Love this. I know nothing about scripting so I have a favor to ask. How can I go about making it add the date (current or when file was created. Doesn't matter what one) to the file name. My phantom always starts at DJI0001.mov and causes issues. So adding the date would help a lot.
  7. Having the same problem as another on top. How to I get this to run. I modified the sample script provided by the docker but unsure how to get it to kick off. So i need to add something to my go line? like make another sh that loops and calls the handbrake script? End goal here. Plug my microsd reader with card from my quad copter into my box, have unassigned devices auto mount and copy video files to watch folder, have watch folder be converted to output folder that Plex scans for my quad videos. I have the unassigned devices part working. just need them to auto convert now :-( Update: I made a simple script that just loops every five mins called up by the go file. This is turn calls the convert script. No errors. But it seems to just take the file instantly and no idea where it goes. Doesn't convert it or copy it anywhere. It did complain about the source and destination path. Updated those in the script provided above, applied the correct permissions on said folders. Can't find any info on any log in the docker folder or in the docker. I'll have to try the shell inside the docker as mentioned in a previous post to see if I can find what it's doing with the file. At this point I might just use and alternative app on my Windows VM no monitor and convert automatically.
  8. I just close the guac page personally and leave the docket running. Then just pull up guac and log in when I need it again.
  9. Having the same problem as another on top. How to I get this to run. I modified the sample script provided by the docker but unsure how to get it to kick off. So i need to add something to my go line? like make another sh that loops and calls the handbrake script? End goal here. Plug my microsd reader with card from my quad copter into my box, have unassigned devices auto mount and copy video files to watch folder, have watch folder be converted to output folder that Plex scans for my quad videos. I have the unassigned devices part working. just need them to auto convert now :-(
  10. I guess you're looking for size? I suppose I could write a custom script like I did for the drive temps. Disk size is easy because query it is relatively fast. Looking at the unraid GUI, there's a "free" column next to the shares. It looks like that data comes from /var/local/emhttp/shares.ini, perhaps updated every few minutes by unraid. That would be easy. Would that work for you? If so, I need some recommendation on where the data should end up. Can I just "extend" something like I did for disk temps? Unfortunately computing the size is hard. That requires walking the whole tree, which for a big share could take several minutes. The other complexity is that you'll probably want a UI to configure which folders to monitor. This is a part of plugin design that I haven't waded into yet. Thanks for the reply. The free space available from the shares.ini is just fine. I would love that.
  11. so after reading this thread I didn't see an answer for a question I have. Is it possible to get it to report the user folder or even individual shares as a drive. Worse case scenario, I would be ok with all my disk's showing. right now its only tracking Log, boot and libvirt
  12. Can you please run it with the following options, then zip up the file and email it to [email protected]? This will create the file diskspeed.log and only test your cache drive. NOTE: Please verify that your cache drive is sdk and alter the command below to accommodate (add sdk, remove current id) diskspeed.sh -l -x sdb,sdc,sdd,sde,sdf,sdg,sdh,sdi,sdj,sdl,sdm Sent!
  13. Great tool. Loved it. Curious how my cache is showing 90MB avg vs the graph and the console showing 381 average
  14. Can I ask where you all placed your *.cfg files for your menu setup and stuff? I have the docker built and running and pointed the images to a test iso share i made. But PC's are not receiving the bootfile and aborting PXE boot. ::EDIT:: I'm using Sparky's TFTP docker. After reading this thread closer. I dont think its the right one. :-( Would love to deploy this in my office for imaging and offline diag (Break fix shop)
  15. Loving the look of this plugin, Was able to import my plexwatch.db with no issues. unfortunately I really need the notification (pushbullet & Pushover) for when new media is added. This doesn't have it :-(
  16. Bump, I would love this for my work's unraid
  17. Try editing your server appdata/crashplan/conf/my.service.xml file, around line 23 may say: <serviceUIConfig> <serviceHost>127.0.0.1</serviceHost> If necessary, change this to: <serviceUIConfig> <serviceHost>0.0.0.0</serviceHost> This makes crashplan listen to non host clients without the use of the ssh tunnel. Restart the Crashplan docker and the Crashplan-Desktop docker should now connect without issue. As this is less secure, once logged into crashplan, change the security settings to require a password to use the client. That did it. Thank you!
  18. I think this is a great idea!
  19. I have never tried to pull over an existing docker. When I swapped in an SSD for my cache from the HDD. I just remade everything. I like clean starts personally. I did run into the issue of naming the folder "Docker" vs "docker" and couldn't figure out why it wouldn't work. Then realized windows isn't case sensitive like *nix. 2 hours of life wasted.
  20. Cool docker. Ill keep this in mind. Would have been great to update plex using wget. I now use cURL and a bat file called by my download and parser. I'm sure ill find a use for it. Thnaks
  21. last thing I can think of is the perms. added a snap of the permissions on mine from MC If that doesn't work, Looks like your starting over and building from scratch like mentioned above.
  22. Jun 24 12:09:57 msstorage logger: Not starting Docker: mount error that leads me to believe the path in the docker settings is wrong. disable docker, repoint it to the img using the menu that pops up when selecting the input box (make sure it is 100% cache only (if using a share)) then try to re-enable it. also I would check for lower and uppercase issues int he path (i made this mistake once) and compare it to the folder and file names using MC or winscp.