Changes to User Script Broke my WebGUI?

Recommended Posts

Let me begin by saying I know practically nothing about script language. I’ve been pretty lucky in figuring out how to make my UNRAID do what I want, but this problem is blowing my mind.


I have the User scripts plugin installed on my server running one script every night that deletes any video files that are over 30 days old from my security camera share. It has worked great for a long time. Now I’ve been trying to add a line to the script to do the same thing for files in my PLEX DVR recorder share. This is the line I was working on:


find /mnt/user/Media\ NAS/DVR\ Library/Judge\ Judy\ (1996)/* -type d -ctime +30 -exec rm -rf {} \;


I have figured out that the line is failing because of the parentheses in the folder name and I was trying to figure out how to fix it… I found a post that suggested putting quotes around the path so I tried that


find ‘/mnt/user/Media\ NAS/DVR\ Library/Judge\ Judy\ (1996) /’ * -type d -ctime +30 -exec rm -rf {} \;


After running the script the webpage display changed putting a series of 3-4 warnings at the top and I could no longer edit the script. When I went to the Dashboard or Home the web-pages were displaying warnings and everything seemed out of order. I tried clicking on “Reboot” but nothing happened. I closed the web-browser and tried to log back in, but after entering my user and password I get a webpage with only two lines on it:


Warning: exec(): Unable to fork [logger -t webGUI 'Successful login user root from'] in /usr/local/emhttp/login.php on line 97
Warning: Cannot modify header information - headers already sent by (output started at /usr/local/emhttp/login.php:97) in /usr/local/emhttp/login.php on line 98


Fortunately, it seems like the server is otherwise working ok. I can access the shares, and the dockers I use like Krusader, Plex, and Deluge are still working and accessible. It seems to be just the WebGUI that has been affected.


Any help would be very usefull

Link to comment
16 minutes ago, Squid said:

What warnings?

Sorry, I didn't think to take a screen shot before I shut down the web browser.


16 minutes ago, Squid said:

If you use quotes, you do not escape the spaces right: "this is a test"  wrong: "this\ is\ a\ test"

Sorry, Like I said, I don't know scripting language.  Every new thing I try I learn a little more, but removing the backslash was not mentioned on that page.  I'll remember that if I should try this again, but I have a  feeling that once I've fixed this, I will just delete old stuff manually from now on.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.