mirror of
https://github.com/kiddin9/op-packages.git
synced 2026-07-27 18:41:15 +08:00
19 lines
404 B
Ucode
19 lines
404 B
Ucode
'use strict';
|
|
|
|
import { glob, unlink } from 'fs';
|
|
|
|
return {
|
|
menu_flush: function() {
|
|
for (let path in glob(
|
|
'/tmp/luci-indexcache', '/tmp/luci-indexcache.*',
|
|
'/var/luci-indexcache', '/var/luci-indexcache.*'
|
|
))
|
|
unlink(path);
|
|
|
|
system('rm -rf /tmp/luci-modulecache /var/luci-modulecache 2>/dev/null');
|
|
|
|
http.prepare_content('application/json');
|
|
http.write_json({ flushed: true });
|
|
}
|
|
};
|