Skip to content

Commit

Permalink
add missing slash for httpd, and be sure script run only once
Browse files Browse the repository at this point in the history
  • Loading branch information
drscream committed Aug 11, 2014
1 parent 58ab10f commit 1d24cdc
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
4 changes: 2 additions & 2 deletions copy/opt/local/etc/httpd/vhosts/01-kumquat.conf
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@

<Location />
ProxyPreserveHost On
ProxyPass http://127.0.0.1:9000
ProxyPassReverse http://127.0.0.1:9000
ProxyPass http://127.0.0.1:9000/
ProxyPassReverse http://127.0.0.1:9000/
</Location>

SSLEngine On
Expand Down
10 changes: 8 additions & 2 deletions copy/var/zoneinit/includes/50-kumquat.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@ MYSQL_KUMQUAT=${MYSQL_KUMQUAT:-$(mdata-get mysql_kumquat_pw 2>/dev/null)} || \
MYSQL_KUMQUAT=$(od -An -N8 -x /dev/random | head -1 | tr -d ' ');
mdata-put mysql_kumquat_pw "${MYSQL_KUMQUAT}"

# check if database exists already
if [ -d /var/mysql/kumquat ]; then
echo 'Database already exists, maybe some migration script will run in the future.'
exit 0
fi

# create kumquat mysql database, user and privileges
KUMQUAT_INIT="CREATE DATABASE IF NOT EXISTS kumquat;
CREATE USER 'kumquat'@'localhost' IDENTIFIED BY '${MYSQL_KUMQUAT}';
Expand Down Expand Up @@ -51,8 +57,8 @@ DATABASES = {
KUMQUAT_CERT_PATH = '/opt/local/etc/httpd/ssl/'
KUMQUAT_VHOST_CONFIG = '/opt/local/etc/httpd/vhosts/vhosts.conf'
KUMQUAT_VHOST_ROOT = '/var/www/'
KUMQUAT_VHOST_UID = www
KUMQUAT_VHOST_GID = www
KUMQUAT_VHOST_UID = 'www'
KUMQUAT_VHOST_GID = 'www'
KUMQUAT_USE_ZFS = ${USE_ZFS}
KUMQUAT_VHOST_DATASET = "${VHOST_DATASET}"
KUMQUAT_WEBSERVER_RELOAD = 'svcadm refresh apache'
Expand Down

0 comments on commit 1d24cdc

Please sign in to comment.