I hadn't really gotten round to fully testing the install script, but I did today, and I had 3 problems with it.
1. After completing the script (clean install!) and browsing to the new roster I had to "upgrade" which gave me an error about inserting a version key into the roster_config which already existed. I added the following code to have the install script insert the version number:
- Code: Select all
version=`cat version.txt | cut -f2 -d\> | cut -f1 -d\<`
$MYSQL << !
UPDATE \`${db_prefix}config\` SET \`config_value\` = '${version}' WHERE \`config_name\` = 'version';
!
I'm pretty sure the extraction of the version number from version.txt can be done in a nicer way with regexps but that's one of my underdeveloped qualities

2. The stored password wouldn't work. Neither the password in typed myself or the "admin" password that's stored in the install.sh. I worked around this by modifying the code to use the md5() function of mysql. This also removes the dependency on the external md5sum program:
- Code: Select all
# Password setting
while :
do
read -s -p "Please enter your desired password: " pass1
echo
read -s -p "Please confirm your password: " pass2
echo
if [ ${pass1} == ${pass2} ]
then
break
fi
echo 'Your passwords did not match. Please retry'
done
$MYSQL << !
INSERT INTO \`${db_prefix}account\` (\`account_id\`,\`name\`,\`hash\`) VALUES
(1,'Guild', md5('${pass1}')),
(2,'Officer', md5('${pass1}')),
(3,'Admin', md5('${pass1}'));
!
3. I'm getting a 404 on the interface_latest.tar.gz