Reply to topic

why shutdown script not being executed ?

milikitato
Registered Member
Posts
19
Karma
0
Hello all,

I have a script that I've set to execute at shutdown/reboot.
I’ve mentioned that script in : kde menu---autostart---script file. Set run on = logout.

That script has :
--move /tmp/downloads/* /media/xyz/downloads >/media/xyz/downloads/shutdown.log 2>&1
(tmp being in ram, xyz being physical drive. Both automounted at boot in fstab)

--”if” instruction testing somethings

and last line is: touch /media/xyz/downloads/logout_script_executed.log


Weirdly sometimes it seems that the script is executed, other times it doesn’t.
Known by the fact that ram files are not present in physical drive and/or that the “touched” file is not created.

The shutdown/reboot is mainly executed by a custom key shortcuts that have “systemctl poweroff” or “systemctl reboot”

any facts why this is inconsistent? If not fact, any clues?

Thanks.
milikitato
Registered Member
Posts
19
Karma
0
hello,

A small correction, the first line in the scripts is:
mv /tmp/downloads/* /home/me/downloads > /home/me/downloads/log.txt 2>&1

Still, don't know why sometimes it isn't executed.

anyone?
User avatar claydoh
Registered Member
Posts
420
Karma
5
OS
I imagine if you posted the actual contents of the script, someone may see what the issue could be - it may not necessarily be related to shutting down. We just can't tell.


claydoh, proud to be a member of KDE forums since 2008-Oct, and KDE user since 2001

 
Reply to topic

Bookmarks



Who is online

Registered users: Baidu [Spider], bartoloni, Bing [Bot], Exabot [Bot], Google [Bot], rafael_garcia, Stephen Leibowitz