File tree Expand file tree Collapse file tree 1 file changed +8
-8
lines changed
registry/coder/modules/kasmvnc Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -230,19 +230,19 @@ get_http_dir() {
230230
231231 # Check the system configuration path
232232 if [[ -e /etc/kasmvnc/kasmvnc.yaml ]]; then
233- d=($( grep -E " ^\s*httpd_directory:.*$" /etc/kasmvnc/kasmvnc.yaml) )
234- # If this grep is successful, it will return:
235- # httpd_directory: /usr/share/kasmvnc/www
236- if [[ $$ {# d[@]} -eq 2 && -d "$${d[1]}" ]]; then
237- httpd_directory= " $$ {d[1]}"
233+ d=$( grep -E ' ^\s*httpd_directory:.*$' " /etc/kasmvnc/kasmvnc.yaml" | awk ' {print $2}' )
234+
235+ if [[ -n " $httpd_directory " ]]; then
236+ httpd_directory=$d
238237 fi
239238 fi
240239
241240 # Check the home directory for overriding values
242241 if [[ -e " $HOME /.vnc/kasmvnc.yaml" ]]; then
243- d=($( grep -E " ^\s*httpd_directory:.*$" " $HOME /.vnc/kasmvnc.yaml" ) )
244- if [[ $$ {# d[@]} -eq 2 && -d "$${d[1]}" ]]; then
245- httpd_directory= " $$ {d[1]}"
242+ d=$( grep -E ' ^\s*httpd_directory:.*$' " $HOME /.vnc/kasmvnc.yaml" | awk ' {print $2}' )
243+
244+ if [[ -n " $httpd_directory " ]]; then
245+ httpd_directory=$d
246246 fi
247247 fi
248248 echo $httpd_directory
You can’t perform that action at this time.
0 commit comments