-
Notifications
You must be signed in to change notification settings - Fork 12
/
init
executable file
·44 lines (35 loc) · 1.19 KB
/
init
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
34
35
36
37
38
39
40
41
42
43
#!/bin/bash
db_name=
db_user=
db_password=
db_host="localhost"
echo "****** WARNING RE-RUNNIG THIS SCRIPT WILL DESTROY THE WHOLE DATABASE"
read -p "Database User: " db_user
read -p "Database Password: " db_password
read -p "Database Host (Eg: localhost): " db_host
read -p "Database Name: " db_name
cat > ./application/configuration/database.ini << EOF
database.default.type = mysql
database.default.host = ${db_host}
database.default.username = ${db_user}
database.default.password = ${db_password}
database.default.port = 3306
database.default.schema = ${db_name}
EOF
lastfm_api_key=
google_dev_key=
read -p "Last.fm API key (From last.fm panel): " lastfm_api_key
read -p "Google Developer Key (Google Developer Console): " google_dev_key
# Install Database and main config
php init.php admin install ${lastfm_api_key} ${google_dev_key}
echo "Setup Virtual Host for this website to work properly"
cat << EOF
<VirtualHost *:80>
ServerAdmin [email protected]
DocumentRoot "/path/to/clone/repo/"
ServerName musik.io
ServerAlias www.musik.io
</VirtualHost>
EOF
echo "Also Make Sure: youtube-dl and ffmpeg are installed and available in your \$PATH"
echo "----------Happy Coding----------"