Delete folders of expired links #1447
-
Describe the problem/questionWhen a created link expire the folder still left empty on the server, there is a way to delete also folders of expired links? Did you use the FAQ section?
What you did?
What happensWhen link expire the php page is deleted but folders for that link still exist in the data folder What should happenFolder of expired link also be removed Additional informationNo response Server addressNo response Server OSUbuntu WebserverApache PrivateBin version1.7.4 Browser and versionFirefox Local operating system and versionWindows 11 Issue reproducibilityNo, I cannot reproduce it on https://privatebin.net as I don't have SFTP access to check folders inside data :) |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
The included administration script comes with an |
Beta Was this translation helpful? Give feedback.
The script is not dependent on docker and part of the default PrivateBin distribution, not just the container image. You would simply call it from the PrivateBin folder, i.e.
./bin/administration --empty-dirs
It is not doing any sophisticated things either, and you could simply call the
find data -type d -empty -delete
(delete any empty directories in data) command directly from your cronjob:PrivateBin/bin/administration
Line 86 in 9eadf09