Debian 9, running script at shutdown -


this driving me insane. been testing 2 days. used work fine on debian 7 won't anymore on debian 9.

just normal debian 9 scratch, nothing special.

i want backup script called mybackup.sh run on shutdown. script moves folders , files remote tar file , backups mysql tables remote host.

i placed file (as debian 7) in /ect/init.d/

when executed directly works fine.

sudo chmod +x /etc/init.d/mybackup.sh     sudo /etc/init.d/mybackup.sh 

all backups run should, takes maximum of 20 seconds.

on debian 7 put symbolic link in /etc/rc0.d let run on shutdown.

sudo ln -s /etc/init.d/mybackup.sh /etc/rc0.d/k04mybackup.sh 

this used work without problems. backup files had been generated on remote folders , hosts , machine shut down smooth.

but fails on debian 9.

i tried following

  • command update-rc.d manipulate header information
  • and/or renaming link k00…, s00…, k04…, s04…
  • generating services "should" start script 1 shutdown

nothing worked. nothing happens. can't find warning or error messages during shutdown or in log files.

i don't it. doing wrong?


Comments

Popular posts from this blog

Is there a better way to structure post methods in Class Based Views -

performance - Why is XCHG reg, reg a 3 micro-op instruction on modern Intel architectures? -

jquery - Responsive Navbar with Sub Navbar -