Maybe /tmp is getting cleared or unmounted first? What happens if you put the script somewhere else?<br><br><div class="gmail_quote"><div dir="ltr">On Mon, Aug 20, 2018, 6:48 PM Filipe Brandenburger <<a href="mailto:filbranden@google.com">filbranden@google.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Mon, Aug 20, 2018 at 4:00 PM Radoslaw Garbacz<br>
<<a href="mailto:radoslaw.garbacz@xtremedatainc.com" target="_blank">radoslaw.garbacz@xtremedatainc.com</a>> wrote:<br>
> Could you please advise me with regard to systemd configuration for service type=oneshot.<br>
> It does not execute stop on shutdown/reboot, but works as intended when called manually.<br>
<br>
I can't reproduce this, it works fine for me on reboot, according to<br>
the journalctl logs below:<br>
<br>
$ journalctl -u xdctest<br>
-- Logs begin at Mon 2018-08-20 23:39:33 UTC, end at Mon 2018-08-20<br>
23:43:52 UTC. --<br>
Aug 20 23:39:45 centos7 systemd[1]: Starting ### service test ###...<br>
Aug 20 23:39:45 centos7 aaa.sh[353]: BEGIN: TESTING systemd: start<br>
Aug 20 23:40:04 centos7 aaa.sh[353]: END:   TESTING systemd: start<br>
Aug 20 23:40:04 centos7 systemd[1]: Started ### service test ###.<br>
Aug 20 23:42:08 centos7 systemd[1]: Stopping ### service test ###...<br>
Aug 20 23:42:08 centos7 aaa.sh[1225]: BEGIN: TESTING systemd: stop<br>
Aug 20 23:42:28 centos7 aaa.sh[1225]: END:   TESTING systemd: stop<br>
Aug 20 23:42:28 centos7 systemd[1]: Stopped ### service test ###.<br>
-- Reboot --<br>
Aug 20 23:42:44 centos7 systemd[1]: Starting ### service test ###...<br>
Aug 20 23:42:44 centos7 aaa.sh[354]: BEGIN: TESTING systemd: start<br>
Aug 20 23:43:03 centos7 aaa.sh[354]: END:   TESTING systemd: start<br>
Aug 20 23:43:03 centos7 systemd[1]: Started ### service test ###.<br>
<br>
Only difference from your reported setup is that I have the aaa.sh<br>
script under /usr/local/bin/ and I only used<br>
WantedBy=multi-user.target (and not default.target), but I believe<br>
none of those should make a difference...<br>
<br>
Cheers,<br>
Filipe<br>
_______________________________________________<br>
systemd-devel mailing list<br>
<a href="mailto:systemd-devel@lists.freedesktop.org" target="_blank">systemd-devel@lists.freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/systemd-devel" rel="noreferrer" target="_blank">https://lists.freedesktop.org/mailman/listinfo/systemd-devel</a><br>
</blockquote></div>-- <br><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><p dir="ltr">Ryan (ライアン)<br>
Yoko Shimomura, ryo (supercell/EGOIST), Hiroyuki Sawano >> everyone else<br>
<a href="https://refi64.com/">https://refi64.com/</a></p>
</div>