forked from Sevyls/vagrant-otrs
-
Notifications
You must be signed in to change notification settings - Fork 1
/
db.sh
17 lines (16 loc) · 760 Bytes
/
db.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
sudo mv Config.pm /opt/otrs/Kernel/Config.pm
sudo chown otrs:www-data /opt/otrs/Kernel/Config.pm
sudo chmod 770 /opt/otrs/Kernel/Config.pm
echo "Creating empty database..."
mysql -uroot -pvagrant -e"CREATE DATABASE otrs CHARSET=utf8 COLLATE=utf8_unicode_ci; GRANT ALL PRIVILEGES ON otrs.* TO 'otrs'@'localhost' IDENTIFIED BY 'vagrant';"
# sudo su - postgres <<POSTGRES
# echo "create user otrs password 'otrspassword';alter user otrs createdb;CREATE DATABASE otrs owner otrs;" | psql > /dev/null
# POSTGRES
# TODO Automatic installation
#sudo su - otrs <<OTRS
#echo "Loading sql scripts into database..."
#cd /opt/otrs/scripts/database/
#psql < otrs-schema.postgresql.sql > /dev/null
#psql < otrs-initial_insert.postgresql.sql > /dev/null
#echo "Done."
#OTRS