wanted:12hr auto resart of x.

Moderators: 666philb, Forum moderators

Post Reply
boof
Posts: 587
Joined: Sat Aug 15, 2020 9:17 am
Been thanked: 8 times

wanted:12hr auto resart of x.

Post by boof »

this would appear to clear the rubbish and prevent my 24hr x shutdowns. pls post me a suitable perpetual script for /root/startup/. i dob't know the names/numbers of the processes. the restart x option in /menu/exit/ does the job, i'd call it if i knew its name after a delay.

williams2
Posts: 1071
Joined: Sat Jul 25, 2020 5:45 pm
Been thanked: 307 times

Re: wanted:12hr auto resart of x.

Post by williams2 »

Code: Select all

#!/bin/ash
sleep 12h
exec restartwm

or maybe this :

Code: Select all

#!/bin/sh
sleep 12h
restartwm&disown

Maybe /root/.cache/ is filling with junk?

boof
Posts: 587
Joined: Sat Aug 15, 2020 9:17 am
Been thanked: 8 times

Re: wanted:12hr auto resart of x.

Post by boof »

thx, 1st one works. tahr

are
rd /root/.cashe/*
rm /root/.cashe/*.*

valid to empty the directory?

williams2
Posts: 1071
Joined: Sat Jul 25, 2020 5:45 pm
Been thanked: 307 times

Re: wanted:12hr auto resart of x.

Post by williams2 »

There are probably files and directories in /root/.cache/ that should not be deleted, like mesa_shader_cache

What might be using a lot of space is /root/.cache/mozilla/ especially if you are running Firefox continuously.

You can remove everything in /root/.cache/mozilla/ like this:

Code: Select all

rm -rf /root/.cache/mozilla/*

Be careful not to accidentally put any spaces in the /root/.cache/mozilla/ name or you could delete something that you did not intend to delete.

I do not know if deleting files in /root/.cache/mozilla/ while Firefox is running and streaming video, would cause problems, like causing Firefox to crash.

You can stream those Australian tv videos using mpv, but you need youtube-dl to be installed. You can download the latest version here:
https://youtube-dl.org/downloads/latest/youtube-dl
It is just 1 executable file, no need to install it. In BionicPup64 it is in /usr/bin/ (it needs to be in the PATH.)
Make it executable if it is not executable.
you can make it executable by right clicking the youtube-dl file, selecting Properties, and checking the Executable boxes.

Then you can run from a script or from a text terminal (console) something like this:

Code: Select all

mpv https://iview.abc.net.au/show/abc-live-stream/video/IV1512H001S00

mpv might run better than Firefox. Or not. It does work on my machine. When I tried it, the stream of ABC tv was an Australian version of Antiques Road Show.

If you are using a save file, you could symlink the directory /root/.cache/mozilla/ to somewhere in /mnt/home, which might have more space than in your save file.

boof
Posts: 587
Joined: Sat Aug 15, 2020 9:17 am
Been thanked: 8 times

Re: wanted:12hr auto resart of x.

Post by boof »

#!/bin/sh
x=1
while x
sleep 3h
rm -rf /root/.cashe/mozilla/*
end

like this?

there individual files accumulating in /root/.cashe/, which become many over time.
event-sound-cashe.tbd.* *==long hex name.
perhps best deleted by
rm -rf /root/.cahe/event-sound-cashe.tbd.* ?

Last edited by boof on Sat Apr 03, 2021 6:24 pm, edited 1 time in total.
williams2
Posts: 1071
Joined: Sat Jul 25, 2020 5:45 pm
Been thanked: 307 times

Re: wanted:12hr auto resart of x.

Post by williams2 »

You could try it, it might do what you want.

Code: Select all

#!/bin/ash
while true
do
sleep 3h
rm -rf /root/.cashe/mozilla/*
done

If the script is named "myscript", you can stop the script like this:
killall myscript

boof
Posts: 587
Joined: Sat Aug 15, 2020 9:17 am
Been thanked: 8 times

Re: wanted:12hr auto resart of x.

Post by boof »

thx,

boof
Posts: 587
Joined: Sat Aug 15, 2020 9:17 am
Been thanked: 8 times

Re: wanted:12hr auto resart of x.

Post by boof »

#!/bin/ash
while true
do
sleep 3h
rm -rf /root/.cashe/mozilla/*
rm -rf /root/.cashe/event-sound-cashe.tdm.*-
done

does not remove any files nor sub-dirctories and their files after 12hrs.

superscript '-' after ~.tdm* may be a problem. will delete.
#!/bin/ash invalid--will fix.

williams2
Posts: 1071
Joined: Sat Jul 25, 2020 5:45 pm
Been thanked: 307 times

Re: wanted:12hr auto resart of x.

Post by williams2 »

I thought FossaPup has busybox's ash (shell).
#!/bin/sh should always work, but it uses about 4MiB more ram than ash, which is not really very much.

Deleting a event-sound-cashe file that isi currently being used by the system might cause the sound to stop working, at least temporarily.
Each file is about 12kb, which is also not really very much.

this:
rm -rf event-sound-cashe*
should delete all of those files if you want.
Actually, you do not need the -r option, there are no sound event files in sub dirs.
And -f is just to prevent rm printing an error message if there is nothing to delete.

boof
Posts: 587
Joined: Sat Aug 15, 2020 9:17 am
Been thanked: 8 times

Re: wanted:12hr auto resart of x.

Post by boof »

thx. i've had one cycle, seems to only have a few dynamic files now, not the large number from b4. it may be ok now. ~.ash was keying error, total accident. not anything i want to know.

Post Reply

Return to “Fossapup64”