View | Details | Raw Unified | Return to bug 23141
Collapse All | Expand All

(-)a/debian/scripts/koha-create (-2 / +22 lines)
Lines 137-142 getmysqlhost() { Link Here
137
        /etc/mysql/koha-common.cnf
137
        /etc/mysql/koha-common.cnf
138
}
138
}
139
139
140
getmysqlport() {
141
    if [ -e /etc/mysql/koha-common.cnf ]
142
    then
143
        port=$(awk '
144
            BEGIN { FS="=" }
145
            $1 ~/\[/ { inclient=0 }
146
            $1 ~/\[client\]/ { inclient=1; next }
147
            inclient==1 && $1 ~/port/ { gsub(/ /, "", $2); print $2 }' \
148
            /etc/mysql/koha-common.cnf)
149
    else
150
        port=3306
151
    fi
152
153
    echo $port
154
}
155
140
getinstancemysqlpassword() {
156
getinstancemysqlpassword() {
141
    xmlstarlet sel -t -v 'yazgfs/config/pass' "/etc/koha/sites/$1/koha-conf.xml"
157
    xmlstarlet sel -t -v 'yazgfs/config/pass' "/etc/koha/sites/$1/koha-conf.xml"
142
}
158
}
Lines 597-602 then Link Here
597
    mysqlhost="$(getmysqlhost)"
613
    mysqlhost="$(getmysqlhost)"
598
fi
614
fi
599
615
616
if [ "$mysqlport" = "" ]
617
then
618
    mysqlport="$(getmysqlport)"
619
fi
620
600
if [ "$op" = create ] || [ "$op" = request ] || [ "$op" = use ]
621
if [ "$op" = create ] || [ "$op" = request ] || [ "$op" = use ]
601
then
622
then
602
    if [ "$mysqlpwd" = "" ]
623
    if [ "$mysqlpwd" = "" ]
Lines 685-691 eof Link Here
685
        touch "$name-db-request.txt"
706
        touch "$name-db-request.txt"
686
        chmod 0600 "$name-db-request.txt"
707
        chmod 0600 "$name-db-request.txt"
687
        cat > "$name-db-request.txt" << eof
708
        cat > "$name-db-request.txt" << eof
688
Please create a MySQL database and user on $mysqlhost as follows:
709
Please create a MySQL database and user on $mysqlhost port $mysqlport as follows:
689
710
690
database name: $mysqldb
711
database name: $mysqldb
691
database user: $mysqluser
712
database user: $mysqluser
692
- 

Return to bug 23141