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

(-)a/debian/scripts/koha-create (-2 / +22 lines)
Lines 152-157 getmysqlhost() { Link Here
152
        /etc/mysql/koha-common.cnf
152
        /etc/mysql/koha-common.cnf
153
}
153
}
154
154
155
getmysqlport() {
156
    if [ -e /etc/mysql/koha-common.cnf ]
157
    then
158
        port=$(awk '
159
            BEGIN { FS="=" }
160
            $1 ~/\[/ { inclient=0 }
161
            $1 ~/\[client\]/ { inclient=1; next }
162
            inclient==1 && $1 ~/port/ { gsub(/ /, "", $2); print $2 }' \
163
            /etc/mysql/koha-common.cnf)
164
    else
165
        port=3306
166
    fi
167
168
    echo $port
169
}
170
155
getinstancemysqlpassword() {
171
getinstancemysqlpassword() {
156
    xmlstarlet sel -t -v 'yazgfs/config/pass' "/etc/koha/sites/$1/koha-conf.xml"
172
    xmlstarlet sel -t -v 'yazgfs/config/pass' "/etc/koha/sites/$1/koha-conf.xml"
157
}
173
}
Lines 677-682 then Link Here
677
    mysqlhost="$(getmysqlhost)"
693
    mysqlhost="$(getmysqlhost)"
678
fi
694
fi
679
695
696
if [ "$mysqlport" = "" ]
697
then
698
    mysqlport="$(getmysqlport)"
699
fi
700
680
if [ "$op" = create ] || [ "$op" = request ] || [ "$op" = use ]
701
if [ "$op" = create ] || [ "$op" = request ] || [ "$op" = use ]
681
then
702
then
682
    if [ "$mysqlpwd" = "" ]
703
    if [ "$mysqlpwd" = "" ]
Lines 765-771 eof Link Here
765
        touch "$name-db-request.txt"
786
        touch "$name-db-request.txt"
766
        chmod 0600 "$name-db-request.txt"
787
        chmod 0600 "$name-db-request.txt"
767
        cat > "$name-db-request.txt" << eof
788
        cat > "$name-db-request.txt" << eof
768
Please create a MySQL database and user on $mysqlhost as follows:
789
Please create a MySQL database and user on $mysqlhost port $mysqlport as follows:
769
790
770
database name: $mysqldb
791
database name: $mysqldb
771
database user: $mysqluser
792
database user: $mysqluser
772
- 

Return to bug 23141