Results 1 to 5 of 5

Thread: How do I use xinetd to start svnserve?

  1. #1
    Join Date
    Sep 2010
    Beans
    55

    How do I use xinetd to start svnserve?

    I am trying to run svnserve on startup on an Ubuntu Server 10.04 machine using xinetd (as suggested here).

    My repositories are at /home/svn, so the directory should be the same as in the example. Following the example, the owner should be www-data, I assume. (Is that right?) I've also tried the admin user account as as the svnowner (the one used to set the svnserver up).

    I've never done any shell scripting, so I tried xinetd instead of using the startup script. But if I don't get any feedback for using xinetd that will be my next course of option.

    For reference, the link above suggests adding
    Code:
    svn stream tcp nowait svnowner /usr/bin/svnserve svnserve -i -r /home/svn
    to the /etc/inetd.conf file, replacing svnowner and /home/svn to the appropriate values (although I'm not 100% sure what those should be). I assume since I did a chown on the repo to www-data that www-data is the owner I need to put in that line, but it doesn't work.

    It's just annoying to have to ssh in and type
    Code:
    svnserve -d --foreground -r /home/svn
    every time I reboot.

    Thank you all in advance for your help,
    Zanthir

  2. #2
    Join Date
    Jan 2011
    Location
    Westside LA
    Beans
    4
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Re: How do I use xinetd to start svnserve?

    Yes, that is totally annoying. I would love help with that too.

  3. #3
    Join Date
    Nov 2008
    Location
    Boston MetroWest
    Beans
    16,326

    Re: How do I use xinetd to start svnserve?

    No one uses inetd any longer, so don't bother with an inetd.conf file. (Sounds like you're using some rather outdated instructions.) Instead, create, as root, a file in /etc/xinetd.d following the pattern in the standard files you'll find there with the appropriate fields for svnserve.

    Also you'll need to know what port svnserve will be using to define the "service" entry in your xinetd configuration file. The name you use must correspond to an entry in /etc/services. Standard services like smtp are already entered in /etc/services, so a file in /etc/xinetd.d for "service smtp" will automatically listen for connections on port 25. I don't see "svnserve" in the standard file on my Ubuntu 10.10 machine, so you'll have to define the port and the service name yourself. There's probably a well-known default port, so use that.

    Then run "sudo service xinetd restart" and see if running "telnet localhost the-port-you've chosen" results in a reply from the svnserve daemon.

  4. #4
    Join Date
    Jan 2011
    Location
    Westside LA
    Beans
    4
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Re: How do I use xinetd to start svnserve?

    Quote Originally Posted by SeijiSensei View Post
    No one uses inetd any longer, so don't bother with an inetd.conf file. (Sounds like you're using some rather outdated instructions.) Instead, create, as root, a file in /etc/xinetd.d following the pattern in the standard files you'll find there with the appropriate fields for svnserve.

    Also you'll need to know what port svnserve will be using to define the "service" entry in your xinetd configuration file. The name you use must correspond to an entry in /etc/services. Standard services like smtp are already entered in /etc/services, so a file in /etc/xinetd.d for "service smtp" will automatically listen for connections on port 25. I don't see "svnserve" in the standard file on my Ubuntu 10.10 machine, so you'll have to define the port and the service name yourself. There's probably a well-known default port, so use that.

    Then run "sudo service xinetd restart" and see if running "telnet localhost the-port-you've chosen" results in a reply from the svnserve daemon.
    That sounds worth a try. In the mean time, I found this article xinetd and svnserve which suggested putting the command in the /etc/rc.local file:

    svnserve -d -r /var/svn

    It seemed to work OK. There might be a better way to do it ~ but it hasn't presented any issues so far.

  5. #5
    Join Date
    Nov 2008
    Location
    Boston MetroWest
    Beans
    16,326

    Re: How do I use xinetd to start svnserve?

    If it will run as a daemon directly without needing a "wrapper" like xinetd, that's by far the easiest solution.

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •