How to do something before shutdown in jetpack 5.02 on AGX


I want to do something before system shutdown on jetson AGX with jetpack v502
I try to create one script file “cam_shutdown”
and put it on /etc/init.d

then I link it to /etc/rc0.d/K01cam_shutdown and /etc/rc6.d/K01cam_shutdown

but when run “sudo shutdown now”
the scrpit seems not be run
How to do it ?

#//=======cam_shutdown script=sample==============
ls -al
sleep 30
exit 0–110n

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.