diff --git a/dbench b/dbench index 33c6965b..28e71cb9 100644 --- a/dbench +++ b/dbench @@ -123,7 +123,7 @@ if [ $init == 1 ]; then exit 0 fi -if [ $d == 1 ]; then +if [ $dev == 1 ]; then if [ "$site" == 0 ]; then site="site1.local" fi @@ -139,7 +139,7 @@ if [ $start == 1 ]; then fi fi -if [ $d == 1 ]; then +if [ $dev == 1 ]; then docker exec -it -u root frappe bash -c "bench --site $site set-config \"developer_mode\" 1 && bench clear-cache" exit 0 fi @@ -152,9 +152,9 @@ fi if [ $add == 1 ]; then a=$(docker exec -i frappe bash -c "cd ~/frappe-bench && ls sites/*/site_config.json" | grep -o '/.\+/') a="${a//$'\n'/ }" - a=$(echo $a | tr -d / ) + a=$(echo "$a" | tr -d / ) result="127.0.0.1 ${a}" - echo $result + echo "$result" docker exec -u root -i frappe bash -c "echo ${result} | tee --append /etc/hosts" docker exec -itu root frappe bash -c "printf '# User rules for frappe\nfrappe ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers.d/frappe"