You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
888 B
28 lines
888 B
#!/bin/sh |
|
## |
|
## typo3-setup |
|
## |
|
|
|
# determine MySQL root password |
|
username=`grep "^user" @l_prefix@/etc/mysql/my.pwd |\ |
|
sed -e 's;^user[^=]*= *;;' -e 's; *$;;'` |
|
password=`grep "^password" @l_prefix@/etc/mysql/my.pwd |\ |
|
sed -e 's;^password[^=]*= *;;' -e 's; *$;;'` |
|
|
|
# dispatch operation |
|
cmd="${1:-"install"}" |
|
case "$cmd" in |
|
install ) |
|
# create the MySQL database for TYPO3 |
|
@l_prefix@/bin/mysqladmin --user="$username" --password="$password" create typo3 |
|
( echo "GRANT ALL ON typo3.* TO typo3@localhost IDENTIFIED BY 'typo3';" |
|
echo "FLUSH PRIVILEGES;" |
|
) | @l_prefix@/bin/mysql --user="$username" --password="$password" typo3 |
|
;; |
|
uninstall ) |
|
# remove the database |
|
( echo "DROP DATABASE typo3;" |
|
) | @l_prefix@/bin/mysql --user="$username" --password="$password" mysql |
|
;; |
|
esac |
|
|
|
|