Add init.d to default runlevels


/ Published in: Bash
Save to your folder(s)

Add init.d to some runlevels


Copy this code and paste it in your HTML
  1. # List installed runlevels
  2. ls /etc/rc.d/rc?.d/*chartsrv
  3.  
  4. # Remove from any runlevels
  5. rm /etc/rc.d/rc?.d/*chartsrv
  6.  
  7. # Install to start at runlevels 2 3 4
  8. for i in 2 3 4 5; do ln -s ../init.d/chartsrv /etc/rc.d/rc$i.d/S99chartsrv; done
  9.  
  10. # Install to stop at all runlevels
  11. for i in 0 1 6; do ln -s ../init.d/chartsrv /etc/rc.d/rc$i.d/K99chartsrv; done

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.