Jump to content
  • Advertisement
Sign in to follow this  
deks

Perforce server on Linux problem

This topic is 4059 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi. I've set up a perfore server on my kubuntu machine for simple dev at home. I created a 'perforce' user, and everything works fine except that I have to login with this user and manually start the server. It's my first try at linux, so sorry if this is a beginner question: how can I automatically start the perforce server when I boot the linux machine? In other words: how can I automatically start a process on behalf of a particular user? Thanks, JF

Share this post


Link to post
Share on other sites
Advertisement
1. You have to place a so called "init-script" in /etc/init.d/
e.g. /etc/init.d/performanceserver

this script contains pretty simple commands:

#! /bin/bash

start() {

# do whatever it needs to start the server

return 0
}

stop() {

# stop the server

return 0
}

case "$1" in
start)
start
;;
stop)
stop
;;
restart|reload)
stop
start
;;
*)

echo $"Usage: $0 {start|stop|restart}"
exit 1
esac


exit 0




2. Then you have to register your init-script to a certain runlevel
( you can view your current runlevel by doing $ runlevel )

Means:
pleace a symlink to your init-script into /etc/rc$(yourrunlevel).d/
e.g.: $ ln -s /etc/init/performanceserver /etc/rc2.d/S99performanceserver


hopefully done!

You can also start, stop and restart your server manually by doing $ sudo /etc/init.d/performanceserver {start,stop,restart}

hope that helps

edit: oh I misread "perforce" ( -> performance ) 8[, sorry

[Edited by - hydroo on June 8, 2007 10:53:59 AM]

Share this post


Link to post
Share on other sites
Works fine, thanks hydroo! I must say that I'm quite impressed by the quality of kubuntu, makes me wonder why we have to pay for Vista... ;p

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!