File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -164,11 +164,11 @@ run-dev: build-dev
164164 if [ ! -e $( BASE_DIR) /dev/wigo.crt ]; then \
165165 (cd $( BASE_DIR) /dev && $( BASE_DIR) /release/current/generate_cert -ca=true -duration=87600h0m0s -host " 127.0.0.1" --rsa-bits=4096; ) \
166166 fi ; \
167- # Try without sudo first , use sudo only if needed
168- $( BASE_DIR ) /release/current/wigo --config $( BASE_DIR ) /etc/wigo-dev.conf & \
169- WIGO_PID= $$ ! ; \
170- sleep 1 ; \
171- if ! kill -0 $$ WIGO_PID 2> /dev/null ; then \
167+ # Check if user is root , use sudo if not
168+ if [ $$ (id -u) -eq 0 ] ; then \
169+ $( BASE_DIR ) /release/current/wigo --config $( BASE_DIR ) /etc/wigo-dev.conf & \
170+ WIGO_PID= $$ ! ; \
171+ else \
172172 sudo $(BASE_DIR ) /release/current/wigo --config $(BASE_DIR ) /etc/wigo-dev.conf & \
173173 WIGO_PID=$$ ! ; \
174174 fi ; \
You can’t perform that action at this time.
0 commit comments