Ignore:
Timestamp:
Nov 1, 2009, 10:10:58 PM (13 years ago)
Author:
ezyang
Message:
Step two of using Wizard for new MediaWiki autoinstalls.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/locker-dev/locker/deploy/bin/onathena

    r1224 r1344  
    158158fi
    159159
    160 if [ "$prompt_username" = "" ]; then
    161   admin_username="admin"
    162   prompt_username=0
    163 fi
    164 if [ "$prompt_password" = "" ]; then
    165   prompt_password=1
    166 fi
    167 
    168 if [ "$prompt_username" -eq 1 ]; then
    169     echo
    170     echo "You will be able to log in to $sname using a username of your choice."
    171     echo "Please decide upon a username and enter it below."
    172     echo "Your username must contain only alphanumeric characters (a-z, 0-9)."
    173     printf "Desired username: "
    174     read admin_username
    175     admin_username=`perl -0e 'print $ARGV[0] =~ /^([[:alnum:]]+)$/' -- "$admin_username"`
    176     if [ "$admin_username" = "" ]; then
    177         echo
    178         echo ERROR:
    179         echo "Your username must contain only alphanumeric characters (a-z, 0-9)."
    180         echo "You will need to run the installer again and choose a different username."
    181         exit 1
    182     fi
    183 fi
    184 
    185160origdir=`pwd`
    186161mkdir -p "$lroot/web_scripts_tmp"
     
    198173fs sa . system:scripts-security-upd write
    199174
    200 if [ "$prompt_password" -eq 1 ]; then
    201     stty -echo
    202     sshrun "deploy$scriptsdev/bin/prompt-password" "$sname" "$deploy" "$addrend" "$admin_username"
    203     stty echo
    204 fi
    205 
    206 echo
    207 echo "Unpacking $sname... (this step might take several minutes)"
    208 
    209175# This version is deprecated, use create_scripts_dir instead
    210176
     
    235201fi
    236202
     203if [ "$wizard" != "" ]; then
     204  vsshrun "wizard/bin/wizard" "install" "$wizard" "$lroot/web_scripts/$addrend"
     205  exit 0
     206fi
     207
     208if [ "$prompt_username" = "" ]; then
     209  admin_username="admin"
     210  prompt_username=0
     211fi
     212if [ "$prompt_password" = "" ]; then
     213  prompt_password=1
     214fi
     215
     216if [ "$prompt_username" -eq 1 ]; then
     217    echo
     218    echo "You will be able to log in to $sname using a username of your choice."
     219    echo "Please decide upon a username and enter it below."
     220    echo "Your username must contain only alphanumeric characters (a-z, 0-9)."
     221    printf "Desired username: "
     222    read admin_username
     223    admin_username=`perl -0e 'print $ARGV[0] =~ /^([[:alnum:]]+)$/' -- "$admin_username"`
     224    if [ "$admin_username" = "" ]; then
     225        echo
     226        echo ERROR:
     227        echo "Your username must contain only alphanumeric characters (a-z, 0-9)."
     228        echo "You will need to run the installer again and choose a different username."
     229        exit 1
     230    fi
     231fi
     232
     233if [ "$prompt_password" -eq 1 ]; then
     234    stty -echo
     235    sshrun "deploy$scriptsdev/bin/prompt-password" "$sname" "$deploy" "$addrend" "$admin_username"
     236    stty echo
     237fi
     238
    237239cd "$origdir"
     240
     241echo
     242echo "Unpacking $sname... (this step might take several minutes)"
    238243
    239244vsshrun "deploy$scriptsdev/bin/$deploy" "$lname" "$sname" "$deploy" "$addrend" "$admin_username" "$requires_sql" "$scriptsdev" "$USER" || die "Unknown failure during configuration"
Note: See TracChangeset for help on using the changeset viewer.