LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux > Linux - General
User Name
Password
Linux - General This forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Tags used in this thread
Popular LQ Tags ,

Reply
 
Thread Tools
Old 02-07-2008, 10:50 AM   #1
StuL
LQ Newbie
 
Registered: Dec 2007
Posts: 3
Thanked: 0
Run Python script as root at startup


[Log in to get rid of this advertisement]
Hello everyone,

I am using HellaNZB which is a Python script which I need to run as root. I am trying to find a way of getting it to run automatically at startup but I have so far been unable to find a way of doing this. I have the following in a script which I then linked to using ln -s in boot.local and also the rc3.d and rc5.d folders in /etc/init:

Code:
#! /bin/bash
cd /home/sty/Desktop/hellanzb-0.13
./hellanzy.py
The script is chmod'd to be executuable.

My distro is openSuse 10.3.

I would be very grateful for any suggestions you may have.
StuL is offline     Reply With Quote
Old 02-08-2008, 04:01 AM   #2
jay73
Senior Member
 
Registered: Nov 2006
Location: Belgium
Distribution: Ubuntu 8.04 / 9.04
Posts: 4,781
Thanked: 89
Shouldn't you use python instead of ./ ?
jay73 is offline     Reply With Quote
Old 03-05-2008, 06:33 PM   #3
soggyoreo
LQ Newbie
 
Registered: Mar 2008
Posts: 2
Thanked: 0
hellanzb.py should be in your path so you shouldnt have to specify it with python or do any directory changing. IE: You should be able to just type 'hellanzb.py' from a shell and have it start. With that said, you should be able to edit '/etc/rc.local' to start hellanzb.py


http://www.linux.com/articles/114107
soggyoreo is offline  
Tag This Post ,
Reply With Quote

Reply

Bookmarks


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Ubuntu How to run Python script on Login? warnetgm Linux - General 12 11-14-2009 02:51 AM
Is a script, run at boot time from init.d, run with root authority? tmbrwolf53 Linux - Server 2 03-31-2007 09:15 PM
How do I run a startup script as a user other than root? Questor21 Linux - Software 4 04-08-2006 12:51 PM
How to run startup script/daemon as a user other than root? Akhran Debian 2 02-04-2006 02:20 AM
how to Run python script on .bash_profile warnetgm Linux - Newbie 32 09-08-2005 06:56 AM


All times are GMT -5. The time now is 09:33 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
RSS2  LQ Podcast
RSS2  LQ Radio
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration