Derek_

Members
  • Posts

    198
  • Joined

  • Last visited

Everything posted by Derek_

  1. Do the children run in paralell? Search this thread for a variety of keywords - i think someone else asked a similar question but theirs was more to do with long-running script that he tried to kill but it didn't actually stop the script.
  2. A simple solution could be to put a sleep in your script before it does anything else: sleep 10m Unless unRAID has a specific order of things but i doubt it would wait for your script to complete before it started it's next thing. What if you had a script that lasted hours? Failing a simple 'sleep' command, you could try calling another script and closing the first one (i.e. not waiting for the child to complete before the parent completes).
  3. Hi Squid. I'm trying to understand and hopefully fix a complicated problem i'm having, and i've been hunting high and low for the cause. I'm not experienced with BASH and scripting. I've learned a lot so far but sadly no cigar. I'm wondering if your statement has any bearing? I've made it more difficult for myself as i have an unusual setup. I run some scripts as my 'backup-user' - i.e. not as root. The user has a shell through the SSH plugin (it's also how i SSH into my box - rather than as root). I can't, or rather don't want to use root, because if i do it 'breaks' the archive as all operations on the archive are done by and owned by the backup-user. I could ditch the backup-user and do everything including SSH into unRAID from the clients as root - but i've designed it so i wouldn't have to. I've actually made a suggestion to Lime to improve the flexibility of the SSH landscape. To the problem: I'm using 'script' to call my 'borg-healthcheck.sh' script as the backup-user. I can't get 'script' (parent) to pass the environment variables to 'borg-check.sh' (child) nor can i get 'borg-check.sh' to return the error codes to 'script' so that i can notify results. I can duplicate the environment variables (most apply to both scripts). But this is bad practise and RCs still don't go back to parent script and without sending RCs back to the parent i can't use notify (notify doesn't work as non-root). I don't believe this is a user.scripts issue. It's either i simply don't know how to do it, or it's an environmental peculiarity. If you have any advice - i'd appreciate it. I have spent days on the whole thing (never touched BASH before this) Thanks. FYI running notify command as a backup-user user I get messages like this, which suggests permissions (understandably): Warning: file_put_contents(/tmp/notifications/archive/2020_04_11_1913_1586596404.notify): failed to open stream: No such file or directory in /usr/local/emhttp/plugins/dynamix/scripts/notify on line 201 - i swear it used to work in 6.7.2. 🤔
  4. Thanks. Yes, i have useful folder names which is ok. Mainly for backup purposes, i have to rename them as i back them up. No biggie, but would be nice. Thank you for the plugin
  5. Is it possible to rename 'script' to something else? When i do, it disappears from the user.scripts GUI.
  6. Hiya, TL;DR - how can i copy files around from a connected Linux desktop GUI and retain the 'date created' stamp on the files i copy? I'm not sure the best settings for accessing unRAID via SMB from a Linux desktop. Whether using 'fstab' or 'autofs' to mount the share, i'm not sure what settings i should use. I ask because when i use rsync -a from the command run from unRAID that has mounted a remote share on another machine, it retains the time/date of the files/folders creation AND modify dates. But if i copy via my desktop - even from unRAID to another share in unRAID - it stamps right now as the create date (but keeps the modify date). Is that something to do with my configuration or that just how things work? If it is something to do with how i connect, here's my cobbled together autofs configuration, e.g.: Media -fstype=cifs,rw,username=derek,password=supersecretpassword,uid=1000,gid=985 ://IP.ADDRESS/Media The UID/GID is based on my desktop user's UID/GID. I've also changed the uid/gid to uid=derek,gid=users (incidentally, what's better? it didn't seem to make any difference). Thanks
  7. Another question: When i run Borg with a user.script - it performs its operations as root (as expected) and the dir/file ownership is root:root When i run and rsync copy with a user.script - it performs its operations as root (as expected) and the file ownership is with nobody:users. How come it differs? I'd like my Borg backups to be nobody:users too - but it looks like the only way i can do that is with chown. I can't run it as nobody can i?
  8. Are there any caveats to using email notification? I've got a user script that calls another script. Both scripts have an email notification and unRAID notification: Script email notification is to say something will start, or won't start based on conditions. If the conditions are met, it calls script2 (stored elsewhere) Script2 then does its thing and tells me whether or not its job was successful (that email notification works fine) unRAID UI notification works in all cases, and whether manually run or run through user.scripts UI. Email notification works for script2, but not script. The command before and the command after it work normally. I created a test script which had the exact same command (just the email command) and ran it via user.scripts UI and it worked - it sent an email... /usr/local/emhttp/webGui/scripts/notify -e "CronJob" -s "unRAID-backup >> STARTED <<" -d "$SCRIPT" -m "Logs :: $LOGFILE" -i "normal" Really weird. I can't figure it out. Note - when i ran manually for testing, the script was on the Array. I can't seem to manually run it from withing /boot/config/plugins/user.scripts/scripts/myscript. UPDATE: Oddly, several of my previous test runs have trickled through now. So while the script2 sent me an email more or less immediately, script dribbled them out between and hour or two after the script was run. Any ideas?
  9. Thanks @dlandon. I think we're on the same page now, we're just having trouble coming to a mutual understanding. Through your comments and my experimenting, i can see that i can't mount the encrypted UD unless i've started the Array with its password. I'm not entering a password in the UD settings (as recommended). Sorry about that Have a beer/coffee for your troubles! It reminds me of the Monty Python sketch in the Holy Grail...
  10. Whenever I use encryption, I like to know about how it's done. If the only key that is used to decrypt is stored rather than supplied (like manually typing it, or using a keyfile stored separately) then I'm wary. Does this same approach you've just described apply even if you use the same password as the Array? It still stores it?
  11. Yes, that's how i understood it - thanks. But i'm still interested to know: When i choose my password to put in UD settings - how it is decrypted from storage? Does inputting my root password decrypt it - and therefor there is no additional encryption key beyond that? I think i'm twisting myself in a knot... Here's the crux i think: Is it possible to auto-decrypt it at mount, and if so, how is the credential called from an encrypted file... without me supplying a password?
  12. Cool, got it: if the password matches the Array Encryption password then it can know it, if we have it set so (some people don't store the encrypted array password on the system - i think pre 6.8 the security around doing so was poor... not sure with 6.8+) If the password doesn't match, then its stored and encrypted. Where is it stored, and how is it encrypted? I'm guessing the root password is what will get it decrypted? Thanks.
  13. Hiya, apologies if this is mentioned somewhere - but it's 163 pages here Can i please ask where and how is the password stored? Is it on the flash drive or the Array, and is it itself encrypted? Thanks.
  14. I gather it didn't work? Same problem? Did you have a read of the posts i linked? If you can install other plugins though, then i don't know what the problem could be. That's all i have i'm afraid. Good luck.
  15. Just doing some searching on your problem and it seems it might be related to a corruption which could be caused by different things. From what i could see (example threads linked): 1. Make sure you're using USB2 2. It's possible your USB drive has a problem. Run Checkdisk on it. 3. RAM full? 4. Something in the package (unlikely, as it hasn't been updated for a while). https://github.com/dorgan/Unraid-networkstats/issues/12
  16. Have you tried reinstalling since updating to 6.8.2?
  17. I think it's just a matter of going to Settings > Cleanup AppData and it will look for orphaned plugins and you'll get an option to delete.
  18. Sorry, i don't have any pearls of wisdom. Although have you tried the "Cleanup AppData" plugin? It might help. Any particular reason you're still on unRAID 6.5.3? We're up to 6.8.2.
  19. I have used Krusader, so i guess if that's something Krusader does then it could well be it. Do you know if i can delete it safely? I presume it'll just re-create it if it needs it again.
  20. Could be that. I've been doing some experimenting and trying out a docker here and there. Any idea if it's harmless to delete it? I presume it'll just re-create as/if/when it's needed.
  21. Not on my network - we have no Apple/Mac devices.
  22. Most of my shares and directories don't have it, but i do sometimes see them, for example my Media share has it, but my Music share does not. What are they for, what do they do and i need them? e.g . Trash-99 Trash-1000 Thanks.
  23. Thanks. So basically either the terminal or Krusader from /mnt/disk1 to /mnt/disk2. And then after that set the share to disk2 (should i want to)?
  24. I've decided to split up my data a bit, for example i'd like to put my Backups share on one drive, and my media/documents/photos on a different drive. Do i go into share settings and specify a particular disk, and then run the mover? Or is it as simple as going to /mnt/disk1 or using Krusader to do the same? There's some very ancient posts about this topic but i didn't see any recent ones. These old posts seem to have a few mentions of bugs and such. Thanks.
  25. Where are you able to see this kind of info? Thanks.