blsimpson

startup

Oct 21st, 2016
133
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.61 KB | None | 0 0
  1. #!/bin/sh
  2.  
  3. # create a service that will run our firstboot script
  4. cat > /etc/init.d/firstboot <<EOF
  5. #! bin/sh
  6.  
  7. ### BEGIN INIT INFO
  8. # Provides:        firstboot
  9. # Required-Start:  $networking
  10. # Required-Stop:   $networking
  11. # Default-Start:   2 3 4 5
  12. # Default-Stop:    0 1 6
  13. # Short-Description: A script that runs once
  14. # Description: A script that runs once
  15. ### END INIT INFO
  16.  
  17. cd /home/admin/post_install ; /usr/bin/nohup sh -x /home/admin/post_install/post_install.sh &
  18.  
  19.  
  20. EOF
  21.  
  22. # install the firstboot service
  23. chmod +x /etc/init.d/firstboot
  24. update-rc.d firstboot defaults
  25.  
  26. echo "finished postinst"
Advertisement
Add Comment
Please, Sign In to add comment