Code Monkey home page Code Monkey logo

recycle.bin's People

Contributors

dlandon avatar gfjardim avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

recycle.bin's Issues

Deleted Files are getting logged twice

If the logging-option is enabled some files are apearing twice in the log.

The logged file in the screenshot was only deleted once, but logged twice.
Screenshot (181)

Excluded shares are not excluded instead .Recycle folder is created (.Recycle vs .Recycle.Bin)

When I exclude a share and delete files it still goes to the bin.

Without excluding a share the Recyle Bin plugin works as expected.
But I only want to enable recycle bin on 1 share. So I started excluding shares.
As soon when I did this and next I delete files on the exluded shares I see a ".Recycle" folder.

  • Using the plugin without excluding shares => ".Recycle.Bin" folder
  • Using the plugin with excluded shares => ".Recycle" folder

Unraid version: 6.12.4
Recycle Bin plugin version: 2023.08.12

Oddities in rc.recycle.bin script

I took a look at the recycle bin script but I don't understand some of the stuff:

       elif [[ `cat /boot/config/smb-extra.conf | grep "vfs objects"` == '' ]]; then
               if [ -e "/boot/config/smb-extra.conf" ]; then
                       sed '/#vfs_recycle_start/,/#vfs_recycle_end/{//d}' /boot/config/smb-extra.conf >> smb.tmp
                       printf %s "$(< smb.tmp)" > /boot/config/smb-extra.conf
                       rm smb.tmp
                       printf "\n" >> /boot/config/smb-extra.conf
                       cat /boot/config/plugins/recycle.bin/config/smb-extra.conf >> /boot/config/smb-extra.conf
               fi

What is the sed trying to do? delete all the lines between the #vfs_recycle_*?
the way you went about it is rather inefficient and quite confusing for me.

Then the crontab has these:

                if [[ `crontab -l | grep "# Purge recycle bin"` != "" ]]; then
                        crontab -l > /tmp/file; sed '/# Purge recycle bin/,/\/mnt\/user\/.Recycle.Bin/d' /tmp/file >> /tmp/cron; crontab /tmp/cron; rm /tmp/file; rm /tmp/cron

But shouldn't /mnt/user/.Recycle.Bin not exist anywhere?

Also we are running as root and sudo is quite unnecessary.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.