-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathstartup.sh
30 lines (27 loc) · 873 Bytes
/
startup.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/bin/bash
set -e
if [ -f /etc/configured ]; then
a2enmod rewrite
a2enmod suexec
a2enmod cgi
echo 'already configured'
else
#code that need to run only one time ....
/usr/bin/mysqld_safe &
sleep 5s
a2enmod rewrite
a2enmod suexec
a2enmod cgi
koha-create --create-db library
#security tweak
mysqladmin -u root password mysqlpsswd
mysqladmin -u root -pmysqlpsswd reload
a2dissite 000-default
rm -R /var/www/html/
killall mysqld
sleep 5s
echo "Password: $(xmlstarlet sel -t -v 'yazgfs/config/pass' /etc/koha/sites/library/koha-conf.xml)"
#needed for fix problem with ubuntu and cron
update-locale
date > /etc/configured
fi