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

(-)a/debian/scripts/koha-create (-2 / +22 lines)
Lines 133-138 getmysqlhost() { Link Here
133
        /etc/mysql/koha-common.cnf
133
        /etc/mysql/koha-common.cnf
134
}
134
}
135
135
136
getmysqlport() {
137
    if [ -e /etc/mysql/koha-common.cnf ]
138
    then
139
        port=$(awk '
140
            BEGIN { FS="=" }
141
            $1 ~/\[/ { inclient=0 }
142
            $1 ~/\[client\]/ { inclient=1; next }
143
            inclient==1 && $1 ~/port/ { gsub(/ /, "", $2); print $2 }' \
144
            /etc/mysql/koha-common.cnf)
145
    else
146
        port=3306
147
    fi
148
149
    echo $port
150
}
151
136
getinstancemysqlpassword() {
152
getinstancemysqlpassword() {
137
    xmlstarlet sel -t -v 'yazgfs/config/pass' "/etc/koha/sites/$1/koha-conf.xml"
153
    xmlstarlet sel -t -v 'yazgfs/config/pass' "/etc/koha/sites/$1/koha-conf.xml"
138
}
154
}
Lines 584-589 then Link Here
584
    mysqlhost="$(getmysqlhost)"
600
    mysqlhost="$(getmysqlhost)"
585
fi
601
fi
586
602
603
if [ "$mysqlport" = "" ]
604
then
605
    mysqlport="$(getmysqlport)"
606
fi
607
587
if [ "$op" = create ] || [ "$op" = request ] || [ "$op" = use ]
608
if [ "$op" = create ] || [ "$op" = request ] || [ "$op" = use ]
588
then
609
then
589
    if [ "$mysqlpwd" = "" ]
610
    if [ "$mysqlpwd" = "" ]
Lines 671-677 eof Link Here
671
        touch "$name-db-request.txt"
692
        touch "$name-db-request.txt"
672
        chmod 0600 "$name-db-request.txt"
693
        chmod 0600 "$name-db-request.txt"
673
        cat > "$name-db-request.txt" << eof
694
        cat > "$name-db-request.txt" << eof
674
Please create a MySQL database and user on $mysqlhost as follows:
695
Please create a MySQL database and user on $mysqlhost port $mysqlport as follows:
675
696
676
database name: $mysqldb
697
database name: $mysqldb
677
database user: $mysqluser
698
database user: $mysqluser
678
- 

Return to bug 23141