This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Sets the status to 0 or 1 which turns that module on or off. | |
# To list the modules you can "USE drupal;" then run "SELECT name,status FROM system WHERE type='module';" | |
ROOT_USER="root" | |
ROOT_PASS=$(</mysql_password/user.txt) | |
echo "$ROOT_PASS" | |
mysql -u "$ROOT_USER" -p"$ROOT_PASS" <<MYSQL_SCRIPT | |
USE drupal; | |
UPDATE system SET status='0' WHERE name='some_drupal_module'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
################################################## | |
# Note: Line 70 will remove the html dir | |
# because we install a backup site. | |
################################################## | |
################################################## | |
# Setup mysql | |
################################################### | |
#!/bin/bash |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
PASS=$(pwgen -s 15 1) | |
USER="CDRT" | |
DB="drupal" | |
service mysqld start | |
mysql -uroot <<MYSQL_SCRIPT | |
CREATE DATABASE $DB; | |
CREATE USER '$USER'@'localhost' IDENTIFIED BY '$PASS'; |