Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I have this script in my home folder (pi): server.py.

How could I make Debian run this script at startup so I dont need to log in and to i manually?

share|improve this question
add comment

2 Answers

up vote 3 down vote accepted

By default debian uses SysV init scripts with the start-stop-daemon binary. There is an example script, /etc/init.d/skeleton you can use as a base for your init script. Once you have your init script and it is marked as executable, the update-rc.d command can be used to add it to desired run levels.

share|improve this answer
    
oh jesus christ. that skeleton file is 150+ lines. just to get that script running :/ –  Jason94 Jul 6 '12 at 20:43
2  
That's 150 lines that you don't have to write. –  jordanm Jul 6 '12 at 20:58
add comment

Put su -c 'SCRIPT' USER into /etc/rc.local.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.