Closed sleepdefic1t closed 6 years ago
Good catch, but I have a better one. The issue is that you want to exclude the top-level search folder. If you use the wildcard behind the /, you run into other issues because you are already selecting files with find.
the correct option is:
-mindepth 1
Example output without:
[matze@shrimpy www]$ find content/ | head
content/
content/css
content/css/page_style.css
content/css/jquery-ui.min.css
content/css/.page_style.css.swp
content/favicon.ico
content/img
content/img/menu.png
content/img/piratebox-logo-horizontal-white.png
content/img/piratebox-logo-small.png
With
[matze@shrimpy www]$ find content/ -mindepth 1 | head
content/css
content/css/page_style.css
content/css/jquery-ui.min.css
content/css/.page_style.css.swp
content/favicon.ico
content/img
content/img/menu.png
content/img/piratebox-logo-horizontal-white.png
content/img/piratebox-logo-small.png
content/index.html
The corect branch of the pull-request is against hotfix-1.1.4 branch or development. :-)
Will you provide a different patch?
Thank you, best regards Matthias
Sorry for the delay replaying back.
I got it to empty using:
find /opt/piratebox/tmp/ -mindepth 1 -delete -exec rm -rf {} \;
But box services would not start after next boot.
Then I tried commenting out the line altogether, and everything ran as expected.
If it's there, I assume it's for a good reason. So I suppose I should start by asking what the reasoning is behind emptying the /temp folder?
Thank you again for your help!
Sorry for my late respones:
So I suppose I should start by asking what the reasoning is behind emptying the /temp folder?
We want to remove logfiles regularly. We also want to remove traces where you might find an IP address as well.
@MaStr No worries! Thank you!
That totally makes sense. I figured asking would be better than just assuming!
PB-Rpi Zero W UART to ESP8266 in mesh-mode 👍
So many awesome things can be done!
Thank you again for the help, and for continuing dev on PB!!
Fixed with e4fc86c
Issue
/opt/piratebox/tmp/
folder is not emptied properly during installation.Expected result
no errors empyting
/opt/piratebox/tmp/
folder.Error Thrown
Reproduction
sudo ./install.sh
Suggested Fix
Change ln94 of
piratebox/init.d/piratebox
from:
find $PIRATEBOX/tmp/ -exec rm {} \;
to:
find $PIRATEBOX/tmp/* -exec rm {} \;
Results after Suggested Fix
no errors emptying
/opt/piratebox/tmp/
folder.