making a few fixes

This commit is contained in:
chabad360 2018-08-02 18:37:37 -07:00
parent 7588546871
commit a2ce6c729a

8
dbench
View file

@ -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"