diff --git a/bootstrap.sh b/bootstrap.sh index b98d651..633d0cc 100644 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -5,6 +5,8 @@ TODAY=`date` HOSTNAME=`hostname` +ARGLINE="$@" +echo $ARGLINE function debug { @@ -70,7 +72,16 @@ function send_notification function become { - sudo su - + local tempfile + + if test -z "$BECOME"; then + echo $BASH_SOURCE + exit + chmod 0755 $tempfile + sudo su - --command=$tempfile + rm $tempfile + exit + fi } function check_values diff --git a/createVhosts.sh b/createVhosts.sh index b9f502f..e36a9f0 100755 --- a/createVhosts.sh +++ b/createVhosts.sh @@ -1,4 +1,4 @@ -#!/usr/bin/env bash +#!/bin/bash -x # # Create Vhosts on VPS3 # @@ -118,7 +118,7 @@ if test -z "$_root" -a -z "$_backend"; then fi # gain priviledges -become +become $@ echo -n "Checking if /srv/http-content-combined/ exists?" if ! test -d /srv/http-content-combined; then