Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MariaDB + Debian Stretch no longer requires debian-sys-maint user. Fix #77

Merged
merged 1 commit into from
Jul 8, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ RUNDECK_PROJECT_STORAGE_TYPE - Options file (default) or db. See: http://rundec

GUI_BRAND_HTML - HTML to show as title in app header. See: http://rundeck.org/docs/administration/gui-customization.html. Useful to show Rundeck environment where multiple Rundeck instances are deployed, e.g. GUI_BRAND_HTML='<span class="title">QA Environment</span>'

DEBIAN_SYS_MAINT_PASSWORD
DEBIAN_SYS_MAINT_PASSWORD - No longer used as of Debian Stretch

NO_LOCAL_MYSQL - false (default). Set to true if using an external MySQL container or instance. Make sure to set DATABASE_URL and RUNDECK_PASSWORD (used for JDBC connection to MySQL). Further details for setting up MYSQL: http://rundeck.org/docs/administration/setting-up-an-rdb-datasource.html

Expand Down
12 changes: 0 additions & 12 deletions content/opt/run
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ if [ ! -f "${initfile}" ]; then
RUNDECK_PASSWORD=${RUNDECK_PASSWORD:-$(pwgen -s 15 1)}
DATABASE_ADMIN_PASSWORD=${DATABASE_ADMIN_PASSWORD:-${RUNDECK_PASSWORD}}
DATABASE_ADMIN_USER=${DATABASE_ADMIN_USER:-rundeck}
DEBIAN_SYS_MAINT_PASSWORD=${DEBIAN_SYS_MAINT_PASSWORD:-$(pwgen -s 15 1)}
RUNDECK_STORAGE_PROVIDER=${RUNDECK_STORAGE_PROVIDER:-"file"}
RUNDECK_PROJECT_STORAGE_TYPE=${RUNDECK_PROJECT_STORAGE_TYPE:-"file"}
NO_LOCAL_MYSQL=${NO_LOCAL_MYSQL:-"false"}
Expand Down Expand Up @@ -93,20 +92,9 @@ if [ ! -f "${initfile}" ]; then
else
echo "=>MySQL datadir is empty...initializing"
/usr/bin/mysql_install_db --user=mysql --basedir=/usr --datadir=/var/lib/mysql
echo "=>Starting MySQL...ignore warning about debian-sys-maint user, it will be granted permissions momentarily"
/etc/init.d/mysql start
sleep 5
(
echo "GRANT ALL PRIVILEGES ON *.* TO 'debian-sys-maint'@'localhost' IDENTIFIED BY '${DEBIAN_SYS_MAINT_PASSWORD}';"
echo "quit"
) |
mysql
fi

# Set debian-sys-maint password
update_user_password debian-sys-maint ${DEBIAN_SYS_MAINT_PASSWORD}
sed -i 's,password\ \=\ .*,password\ \=\ '${DEBIAN_SYS_MAINT_PASSWORD}',g' /etc/mysql/debian.cnf

(
echo "CREATE DATABASE IF NOT EXISTS rundeckdb;"
echo "GRANT SELECT, INSERT, UPDATE, DELETE, DROP, CREATE, CREATE VIEW, ALTER, INDEX, EXECUTE ON rundeckdb.* TO 'rundeck'@'localhost' IDENTIFIED BY '${RUNDECK_PASSWORD}';"
Expand Down