| ... | ... |
@@ -4,7 +4,6 @@ |
| 4 | 4 |
# Dependencies: |
| 5 | 5 |
# ``functions`` file |
| 6 | 6 |
# is_apache_enabled_service |
| 7 |
-# change_apache_user_group |
|
| 8 | 7 |
# install_apache_wsgi |
| 9 | 8 |
# config_apache_wsgi |
| 10 | 9 |
# start_apache_server |
| ... | ... |
@@ -52,29 +51,6 @@ function is_apache_enabled_service() {
|
| 52 | 52 |
return 1 |
| 53 | 53 |
} |
| 54 | 54 |
|
| 55 |
-# change_apache_user_group() - Change the User/Group to run Apache server |
|
| 56 |
-function change_apache_user_group(){
|
|
| 57 |
- local stack_user=$@ |
|
| 58 |
- if is_ubuntu; then |
|
| 59 |
- sudo sed -e " |
|
| 60 |
- s/^export APACHE_RUN_USER=.*/export APACHE_RUN_USER=${stack_user}/g;
|
|
| 61 |
- s/^export APACHE_RUN_GROUP=.*/export APACHE_RUN_GROUP=${stack_user}/g
|
|
| 62 |
- " -i /etc/${APACHE_NAME}/envvars
|
|
| 63 |
- elif is_fedora; then |
|
| 64 |
- sudo sed -e " |
|
| 65 |
- s/^User .*/User ${stack_user}/g;
|
|
| 66 |
- s/^Group .*/Group ${stack_user}/g
|
|
| 67 |
- " -i /etc/${APACHE_NAME}/httpd.conf
|
|
| 68 |
- elif is_suse; then |
|
| 69 |
- sudo sed -e " |
|
| 70 |
- s/^User .*/User ${stack_user}/g;
|
|
| 71 |
- s/^Group .*/Group ${stack_user}/g
|
|
| 72 |
- " -i /etc/${APACHE_NAME}/uid.conf
|
|
| 73 |
- else |
|
| 74 |
- exit_distro_not_supported "apache user and group" |
|
| 75 |
- fi |
|
| 76 |
-} |
|
| 77 |
- |
|
| 78 | 55 |
# install_apache_wsgi() - Install Apache server and wsgi module |
| 79 | 56 |
function install_apache_wsgi() {
|
| 80 | 57 |
# Apache installation, because we mark it NOPRIME |
| ... | ... |
@@ -203,9 +203,6 @@ function _config_swift_apache_wsgi() {
|
| 203 | 203 |
|
| 204 | 204 |
done |
| 205 | 205 |
|
| 206 |
- # run apache server as stack user |
|
| 207 |
- change_apache_user_group ${STACK_USER}
|
|
| 208 |
- |
|
| 209 | 206 |
# WSGI isn't enabled by default, enable it |
| 210 | 207 |
! is_fedora && sudo a2enmod wsgi |
| 211 | 208 |
} |
| ... | ... |
@@ -562,10 +559,6 @@ function start_swift() {
|
| 562 | 562 |
fi |
| 563 | 563 |
|
| 564 | 564 |
if is_apache_enabled_service swift; then |
| 565 |
- # Make sure the apache lock dir is owned by $STACK_USER |
|
| 566 |
- # for running apache server to avoid failure of restarting |
|
| 567 |
- # apache server due to permission problem. |
|
| 568 |
- sudo chown -R $STACK_USER /var/run/lock/$APACHE_NAME |
|
| 569 | 565 |
restart_apache_server |
| 570 | 566 |
swift-init --run-dir=${SWIFT_DATA_DIR}/run rest start
|
| 571 | 567 |
screen_it s-proxy "cd $SWIFT_DIR && sudo tail -f /var/log/$APACHE_NAME/proxy-server" |