]>
git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blob - src/scripts/setreservedports
3 # $Id: setreservedports,v 1.1.2.3 2005/09/07 21:38:50 eoberlander Exp $
4 # Change https server port only at this time,
5 # it will be integrate in web interface later
6 # suggested port for https interface could be 5445
11 echo "Give an https port number, recommended value is non-assigned port 5445"
13 if [ "$1" -lt "444" -o "$1" -gt "65535" ]; then
14 echo "support only a port value from 445 to 65535"
15 echo "recommended value is non-assigned port 5445"
18 /bin
/sed -i -e "s+# TCP 67,68,81.*$+# TCP 67,68,81,$SSH,$HTTPS+" \
19 -e "s+my @tcp_reserved = (81.*$+my @tcp_reserved = (81,$SSH,$HTTPS);+" \
20 /home
/httpd
/cgi-bin
/portfw.cgi
22 # only the second Listen only has {3,5} digits if the first is 81
23 /bin
/sed -i -e "+s+Listen [0-9]\{3,5\}$+Listen $HTTPS+" \
24 -e "s+<VirtualHost _default_.*$+<VirtualHost _default_:$HTTPS>+" \
25 /etc
/httpd
/conf
/httpd.conf
27 /bin
/sed -i -e "s+:[0-9]\{3,5\}/\$ENV{'PATH_INFO'}+:$HTTPS/\$ENV{'PATH_INFO'}+" \
30 /bin
/sed -i -e "s+acl IPFire_https port.*$+acl IPCop_https port $HTTPS+" \
32 /bin
/chown nobody
:nobody
/var
/ipfire
/proxy
/acl
34 /bin
/sed -i -e "s+acl IPFire_https port.*$+acl IPCop_https port $HTTPS+" \
35 /var
/ipfire
/proxy
/squid.conf
36 /bin
/chown nobody
:nobody
/var
/ipfire
/proxy
/squid.conf
38 # restart everything impacted
42 /usr
/local
/bin
/restartsquid
43 /usr
/bin
/logger
-s -p local0.info
"$0 :https port shift to $HTTPS"