Jump to content

Create new service and/or run command line@startup


Guest jonnyz0109
 Share

Recommended Posts

Guest jonnyz0109

I have to manually start three things every time I boot up the box. How can I make this happen automatically, after just simply turning the computer on?

 

The three command lines are:

 

> /home/tsserver/tss2_rc2/server_linux

(don't know if I can just type 'server_linux' or something, this is a TeamSpeak 2 server)

 

> vncserver :1 -geometry 1280x1024

> vncserver :2 -geometry 1024x768

 

Vncserver was a service already, it's in the services panel, but for some reason I still have to run this command manually. tsserver is not a service at all.

 

Reference: http://mandrakeusers.org/index.php?showtopic=5084

 

The solution here is in a different language to me, sorry for my linux ignorance :joker: I'd like to implement the second suggestion there too, making it so the process is persistant and comes back, even if it crashes, gets killed, w/e. These are servers and although I can ssh to start them I'd rather just know that they are always up, so long as the computer is on and I have internet access.

 

Thanks in advance,

Jonny :thumbs:

 

 

 

Moved to Terminal Shell Commands, Kernel and Programming - Artificial Intelligence

Link to comment
Share on other sites

Add these 3 lines to the end of /etc/inittab

 

r1:2345:respawn:/bin/su - jonny -c "/home/tsserver/tss2_rc2/server_linux"

r2:2345:respawn:/bin/su - jonny -c "/usr/X11R6/bin/vncserver :1 -geometry 1280x1024"

r3:2345:respawn:/bin/su - jonny -c "/usr/X11R6/bin/vncserver :2 -geometry 1024x768"

 

At least I'm pretty sure it'll work that way and run as your user. Try it out.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...