1 |
# $Id: smeserver-mediawiki.spec,v 1.12 2022/07/12 11:29:51 brianr Exp $ |
# $Id: smeserver-mediawiki.spec,v 1.13 2022/07/12 11:47:01 brianr Exp $ |
2 |
# Authority: ber_die |
# Authority: ber_die |
3 |
# Name: Dietmar Berteld |
# Name: Dietmar Berteld |
4 |
|
|
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/ |