1 |
# $Id: smeserver-mediawiki.spec,v 1.11 2022/06/08 12:13:07 brianr Exp $ |
# $Id: smeserver-mediawiki.spec,v 1.14 2022/07/12 15:13:30 brianr Exp $ |
2 |
# Authority: ber_die |
# Authority: ber_die |
3 |
# Name: Dietmar Berteld |
# Name: Dietmar Berteld |
4 |
|
|
34 |
|
|
35 |
%changelog |
%changelog |
36 |
* Tue Jul 12 2022 Brian Read <brianr@bjsystems.co.uk> 1.38.2-1.sme |
* Tue Jul 12 2022 Brian Read <brianr@bjsystems.co.uk> 1.38.2-1.sme |
37 |
- Update version to Mediawiki-1.38.1 [sme: 11987] |
- Update version to Mediawiki-1.38.2 [sme: 11987] |
38 |
- Fix initial admin user |
- Fix initial admin user password |
39 |
|
|
40 |
* Thu Jun 09 2022 Brian Read <brianr@bjsystems.co.uk> 1.38.1-2.sme |
* Thu Jun 09 2022 Brian Read <brianr@bjsystems.co.uk> 1.38.1-2.sme |
41 |
- fix sql user create [SME: 11987] |
- fix sql user create [SME: 11987] |
150 |
APP=MediaWiki |
APP=MediaWiki |
151 |
URL=wiki |
URL=wiki |
152 |
WORKDIR=/root |
WORKDIR=/root |
153 |
MEDIAWIKIVERSION='1.38.1' |
MEDIAWIKIVERSION='1.38.2' |
154 |
INSTALLDIR=/usr/share/doc/mediawiki-$MEDIAWIKIVERSION/Sources |
INSTALLDIR=/usr/share/doc/mediawiki-$MEDIAWIKIVERSION/Sources |
155 |
HTMLDIR=/opt/mediawiki |
HTMLDIR=/opt/mediawiki |
156 |
MYSQLDB=mediawiki |
MYSQLDB=mediawiki |
212 |
echo "Creating MySQL User and DataBase..." |
echo "Creating MySQL User and DataBase..." |
213 |
mysqladmin -u root create $MYSQLDB |
mysqladmin -u root create $MYSQLDB |
214 |
mysql $MYSQLDB < $INSTALLDIR/$MYSQLDB.sql |
mysql $MYSQLDB < $INSTALLDIR/$MYSQLDB.sql |
215 |
|
mysql $MYSQLDB -e "UPDATE user SET user_password = MD5( CONCAT( user_id, '-', MD5( 'mediawikiadmin' ) ) ) WHERE user_id =1 " |
216 |
mysql -u root -e "SET PASSWORD FOR $MYSQLUSER@localhost = PASSWORD( '$MYSQLPASS' ) " |
mysql -u root -e "SET PASSWORD FOR $MYSQLUSER@localhost = PASSWORD( '$MYSQLPASS' ) " |
217 |
mysqladmin flush-privileges |
mysqladmin flush-privileges |
218 |
;; |
;; |
267 |
echo "-------------------------------------------------------------------------------" |
echo "-------------------------------------------------------------------------------" |
268 |
|
|
269 |
%preun |
%preun |
270 |
MEDIAWIKIVERSION='1.38.1' |
MEDIAWIKIVERSION='1.38.2' |
271 |
INSTALLDIR=/usr/share/doc/mediawiki-$MEDIAWIKIVERSION/Sources |
INSTALLDIR=/usr/share/doc/mediawiki-$MEDIAWIKIVERSION/Sources |
272 |
if [ $1 = 0 ] ; then |
if [ $1 = 0 ] ; then |
273 |
mv $INSTALLDIR/DO_NOT_USE_OR_DELETE/MW-Full-Uninstall.sh /root/ |
mv $INSTALLDIR/DO_NOT_USE_OR_DELETE/MW-Full-Uninstall.sh /root/ |