-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathstartServices.sh
More file actions
33 lines (28 loc) · 876 Bytes
/
startServices.sh
File metadata and controls
33 lines (28 loc) · 876 Bytes
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
31
32
33
#!/bin/bash
# Check if there is a network connection on the host machine.
SERVERIP=134.58.117.134
ping -c 3 $SERVERIP > /dev/null 2>&1
if [ $? -eq 0 ]
then
echo "Installing Scientific Linux updates"
yum -y update
else
echo "No network found, not installing Scientific Linux updates"
fi
service php72-php-fpm start
service httpd24-httpd start
chown -R mysql /var/lib/mysql
mysql_install_db
chown -R mysql /var/lib/mysql
service mysql start
sleep 10s
RESULT=`mysqlshow deepskylog | grep -o deepskylog`
if [ "$RESULT" != "deepskylog" ]; then
echo "CREATE database deepskylog;" | mysql
mysql deepskylog < /www.deepskylog.org.sql
rm /www.deepskylog.org.sql
fi
# Add an admin user
#mysql -uroot -e "CREATE USER 'admin'@'%' IDENTIFIED BY 'deepskylog'"
#mysql -uroot -e "GRANT ALL PRIVILEGES ON *.* TO 'admin'@'%' WITH GRANT OPTION"
tail -F /var/log/httpd24/error_log