You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
apiDetails=$(echo "$apiDetails"| sed -e 's/"/'$escapeReplaceQuote'/g')
66
-
rm sql/default_user.sql ||true
67
-
echo"USE ccio;INSERT INTO Users (\`ke\`,\`uid\`,\`auth\`,\`mail\`,\`pass\`,\`details\`) VALUES (\"$groupKey\",\"$userID\",\"$apiKey\",\"$userEmail\",\"$userPasswordMD5\",\"$userDetails\");INSERT INTO API (\`code\`,\`ke\`,\`uid\`,\`ip\`,\`details\`) VALUES (\"$apiKey\",\"$groupKey\",\"$userID\",\"$apiIP\",\"$apiDetails\");">"sql/default_user.sql"
68
-
sudo mysql -u $sqluser -p$sqlpass --database ccio -e "source sql/default_user.sql">"INSTALL/log.txt"
69
-
echo"The following details will be shown again at the end of the installation."
70
-
echo"====================================="
71
-
echo"======= Login Credentials ======="
72
-
echo"|| Username : $userEmail"
73
-
echo"|| Password : $userPasswordPlain"
74
-
echo"|| API Key : $apiKey"
75
-
echo"====================================="
76
-
echo"====================================="
77
-
echo"** To change these settings login to either to the Superuser panel or login to the dashboard as the user that was just created and open the Settings window. **"
55
+
read mysqlagree
56
+
if [ "$mysqlagree"="y" ] || [ "$mysqlagree"="Y" ];then
57
+
sudo yum install mariadb mariadb-server -y
58
+
#Start mysql and enable on boot
59
+
sudo systemctl start mariadb
60
+
sudo systemctl enable mariadb
61
+
#Run mysql install
62
+
sudo mysql_secure_installation
63
+
fi
64
+
echo"============="
65
+
echo"Shinobi - Database Installation"
66
+
echo"(y)es or (N)o"
67
+
read mysqlagreeData
68
+
if [ "$mysqlagreeData"="y" ] || [ "$mysqlagreeData"="Y" ];then
69
+
echo"What is your SQL Username?"
70
+
read sqluser
71
+
echo"What is your SQL Password?"
72
+
read sqlpass
73
+
sudo mysql -u $sqluser -p$sqlpass -e "source sql/user.sql"||true
74
+
sudo mysql -u $sqluser -p$sqlpass -e "source sql/framework.sql"||true
75
+
echo"Shinobi - Do you want to create a new user for viewing and managing cameras in Shinobi? You can do this later in the Superuser panel."
76
+
echo"(y)es or (N)o"
77
+
read mysqlDefaultData
78
+
if [ "$mysqlDefaultData"="y" ] || [ "$mysqlDefaultData"="Y" ];then
apiDetails=$(echo "$apiDetails"| sed -e 's/"/'$escapeReplaceQuote'/g')
92
+
rm sql/default_user.sql ||true
93
+
echo"USE ccio;INSERT INTO Users (\`ke\`,\`uid\`,\`auth\`,\`mail\`,\`pass\`,\`details\`) VALUES (\"$groupKey\",\"$userID\",\"$apiKey\",\"$userEmail\",\"$userPasswordMD5\",\"$userDetails\");INSERT INTO API (\`code\`,\`ke\`,\`uid\`,\`ip\`,\`details\`) VALUES (\"$apiKey\",\"$groupKey\",\"$userID\",\"$apiIP\",\"$apiDetails\");">"sql/default_user.sql"
94
+
sudo mysql -u $sqluser -p$sqlpass --database ccio -e "source sql/default_user.sql">"INSTALL/log.txt"
95
+
echo"The following details will be shown again at the end of the installation."
96
+
echo"====================================="
97
+
echo"======= Login Credentials ======="
98
+
echo"|| Username : $userEmail"
99
+
echo"|| Password : $userPasswordPlain"
100
+
echo"|| API Key : $apiKey"
101
+
echo"====================================="
102
+
echo"====================================="
103
+
echo"** To change these settings login to either to the Superuser panel or login to the dashboard as the user that was just created and open the Settings window. **"
echo"|| Access the main Shinobi panel at http://$(ifconfig | sed -En 's/127.0.0.1//;s/.*inet (addr:)?(([0-9]*\.){3}[0-9]*).*/\2/p'):8080 in your web browser."
0 commit comments