- 참고 : https://steady-snail.tistory.com/272
#!/bin/bash
### BEGIN INIT INFO
# Provides: startup.sh
# Required-Start: $reboot
# Required-Stop: $reboot
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Server init script
### END INIT INFO
case "$1" in
start)
# run as a specific user
sudo -u <username> /foo/bar
# TODO Something..
;;
*)
echo "Usage: $0 (start)"
;;
esac
exit 0
chmod 755 startup.sh
update-rc.d startup.sh defaults
update-rc.d -f startup.sh remove