I'm trying to run a Bash
script which calls appcmd
to add a site to IIS.
#!/bin/bash
windir=c:\\windows
domain="$1"
path="$2"
#also tried using forward slashes by replacing backslashes
#physicalPath=`echo "$path" | sed 's/\\\\/\//g'`
#add site
$windir\\syswow64\\inetsrv\\appcmd add site /name:$domain /physicalpath:$path
I'm calling the script using:
script.sh mydomain.com c:\mypath
However when I check IIS, the Physical Path property of the site is set using forward slashes instead of backslashes.
What am I doing wrong?