v14 Clear cache with autostart.sh
#1
Hi, I'm trying to clear my cache with an autostart.sh script I made in /storage/.config/ by deleting the 'cache.db' file and 'cache' folder
but it doesn't seem to work. I've tried invoking the script through ssh and I get the following:

OpenELEC:~/.config # sh autostart.sh
: not foundh: line 7:
: not found.config # autostart.sh: line 7:
Clearing Cache, One moment..

This is the autostart.sh

Code:
#!/bin/sh
# Clear Cache script
(
echo "Clearing Cache, One moment.."
rm -rf /storage/.kodi/userdata/addon_data/plugin.video.myplug/cache.db
rm -rf /storage/.kodi/userdata/addon_data/plugin.video.myplug/cache
) &

Any help would be appreciated.. Thanks Smile
Reply
#2
Make sure you save the file using a text editor that can create files with Unix/Linux line endings - something like Notepad++ or TextPad.

Or run the following in ssh:
Code:
dos2unix /storage/.config/autostart.sh
Texture Cache Maintenance Utility: Preload your texture cache for optimal UI performance. Remotely manage media libraries. Purge unused artwork to free up space. Find missing media. Configurable QA check to highlight metadata issues. Aid in diagnosis of library and cache related problems.
Reply
#3
(2015-08-01, 15:24)Milhouse Wrote: Make sure you save the file using a text editor that can create files with Unix/Linux line endings - something like Notepad++ or TextPad.

Or run the following in ssh:
Code:
dos2unix /storage/.config/autostart.sh

Awesome thanks Milhouse! I was using nano and saving it as a dos file. Cheers
Reply

Logout Mark Read Team Forum Stats Members Help
Clear cache with autostart.sh0