forked from jhwiig/CatConnect
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathupdateDB.sh
More file actions
12 lines (9 loc) · 787 Bytes
/
updateDB.sh
File metadata and controls
12 lines (9 loc) · 787 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
# This code updates the list of users, devices, and MAC addresses for CatConnect.
# The data is pulled from the 'wordpress' database which stores submissions from the plugin 'Form Maker' by WebDorado F0rm Builder Team
# The updated list outputs to the file 'users.txt' which is located in '/var/lib/mysql/wordpress'
# Created by: Beth Mallon during Spring Quarter 2018 for DTC 2 at Northwestern for the project 'CatConnect' by Team 4, Section 14
#!/bin/bash
sudo rm /var/lib/mysql/wordpress/users.txt
sudo mysql --password=owl wordpress<<EOFMYSQL
select element_value from wp_formmaker_submits INTO OUTFILE 'users.txt'; # copies all the text from the column 'element_value' in the wordpress database table called 'wp_formmaker_submits' into a text file called 'users.txt'
EOFMYSQL