LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux 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

Reply
 
Search this Thread
Old 02-07-2008, 09:50 AM   #1
StuL
LQ Newbie
 
Registered: Dec 2007
Posts: 3

Rep: Reputation: 0
Run Python script as root at startup


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.
 
Old 02-08-2008, 03:01 AM   #2
jay73
Guru
 
Registered: Nov 2006
Location: Belgium
Distribution: Ubuntu 11.04, Debian testing
Posts: 5,019

Rep: Reputation: 130Reputation: 130
Shouldn't you use python instead of ./ ?
 
Old 03-05-2008, 05:33 PM   #3
soggyoreo
LQ Newbie
 
Registered: Mar 2008
Posts: 2

Rep: Reputation: 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
 
  


Reply

Tags
hellanzb, rclocal


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 On
HTML code is Off


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


All times are GMT -5. The time now is 12:59 AM.

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
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration