Discussion Possible bug in pgmove.sh

beats

Full Member
Original poster
Staff
Local time
10:53 PM
Oct 10, 2018
36
23
PG Version
8.6.3
Mount Type
Move Unencrypted
Server Type
Remote - Dedicated Server
Hi
I have noticed PGMOVE does not appear to be removing empty directories in the latest version.

The latest commit changed to to:
Bash:
find "{{hdpath}}/move/*" -type d -mmin +2 -empty -exec rm -rf {} \;
Now if I run it without the -exec to test you get:
Code:
find: ‘/mnt/move/*’: No such file or directory
I need to have a gander at find switches to see how to fix it but I thought I would report it before going to bed.

Cheers
 

captngimpy

Senior Member
Staff
Local time
4:53 PM
Mar 14, 2018
110
31
I believe it has to do with the "{{hdpath}}/move/*" adding in the *. Try testing with the * removed and see if that works.
 
M

MrDoob

Guest
From :

Bash:
find "{{hdpath}}/move/*" -type d -mmin +2 -empty -exec rm -rf {} \;
To

Bash:
find "{{hdpath}}/move/" -type d -mmin +2 -empty -exec rm -rf {} \;
The " * " is wrong.
Remove it :)

after removing the *

Stop first the service ; the edit the file .
then start the service .

Dont edit first the file and restart the service .

You must stop the service first , if you dont do it, you have the service double running. This made fails .
 
  • Like
Reactions: beats

captngimpy

Senior Member
Staff
Local time
4:53 PM
Mar 14, 2018
110
31
Well thats good info to know! I have been editing then using either service pgblitz restart or stop then start.

Thanks
 

beats

Full Member
Original poster
Staff
Local time
10:53 PM
Oct 10, 2018
36
23
Thanks yeah I thought the * was the problem, I was just heading to bed when I spotted it and I was too tired to boot a vm and test.
 
  • Like
Reactions: MrDoob

Create an account or login to comment

You must be a member in order to leave a comment

Create account

Create an account on our community. It's easy!

Log in

Already have an account? Log in here.

Similar threads


Maintenance Donations

Recommend NewsGroups

      Up To a 58% Discount!

Trending