Hi,
I need to run sudo from inside a sh script and I wonder if anyone could explain me how to do that?
Here is my partial code
Looking at sh(1), I tried to start
I need to run sudo from inside a sh script and I wonder if anyone could explain me how to do that?
Here is my partial code
Code:
cat << 'EOF' > /usr/local/etc/hiawatha/bindings.conf
Binding {
Port = 80
#Interface = MyIPv4
MaxKeepAlive = 100
TimeForRequest = 5,15
MaxRequestSize = 2000
MaxUploadSize = 2
}
#Binding {
# Port = 443
# Interface = MyIPv4
# MaxKeepAlive = 100
# TimeForRequest = 5,15
# TLScertFile = /etc/ssl/localcerts/blog_example_tld.pem
# MaxRequestSize = 2000
# MaxUploadSize = 2
#}
#Binding {
# Port = 80
# Interface = MyIPv6
# MaxKeepAlive = 100
# TimeForRequest = 5,15
# MaxRequestSize = 2000
# MaxUploadSize = 2
#}
#Binding {
# Port = 443
# Interface = MyIPv6
# MaxKeepAlive = 100
# TimeForRequest = 5,15
# TLScertFile = /etc/ssl/localcerts/blog_example_tld.pem
# MaxRequestSize = 2000
# MaxUploadSize = 2
#}
EOF
Looking at sh(1), I tried to start
sudo -c cat...
but that didn't work.