The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Script to automate subversion in jailshell

Discussion in 'General Discussion' started by smoge, May 5, 2008.

  1. smoge

    smoge Well-Known Member

    Joined:
    Jul 2, 2004
    Messages:
    52
    Likes Received:
    0
    Trophy Points:
    6
    This script assumes you have Subversion installed.

    It checks for the virtfs entry, and if exists, copies the necessary libraries for subversion (svn) to work in a jailshell.

    Code:
    ##!/bin/bash
    ## Setup libapr libaprutil for jail shell users
    ## support@mysitegroup.com
    echo ====================================
    echo 
    echo Script to add library support for cPanel JailShell Subversion usage
    echo
    echo jailshell_svn.sh cpanelusername
    echo
    echo Need help? - support@mysitegroup.com
    echo
    echo Use at your own risk!
    echo
    echo ====================================
    echo
    if [ "$1" != "" ]; then
        if [ -f /home/virtfs/$1/checkvirtfs ]
          then
          echo "Found $1 JailShell."
          echo
        else
          echo "Sorry, $1 does not appear to use JailShell."
          echo
          exit 2
        fi
    mkdir /home/virtfs/$1/usr/local/apr
    mkdir /home/virtfs/$1/usr/local/apr/lib
    cp /usr/local/apr/lib/libapr-0.so.0 /home/virtfs/$1/usr/local/apr/lib/libapr-0.so.0
    cp /usr/local/apr/lib/libaprutil-0.so.0 /home/virtfs/$1/usr/local/apr/lib/libaprutil-0.so.0
    echo
    echo Libraries for svn usage added to $1 user jail shell
    echo
    exit 0
    else
    echo You need to provide the cpanel user name.
    echo 
    echo Try again.
    echo
    exit 1
    fi
    Warm regards,

    Smoge
     
  2. vexil

    vexil Member

    Joined:
    Apr 16, 2006
    Messages:
    13
    Likes Received:
    0
    Trophy Points:
    1
    New accounts?

    Thanks, but how would you make it add this to the virtfs for ALL new accounts?
     
Loading...

Share This Page