#!/bin/sh
# chkconfig: 345 75 10
# description: OpenOffice auto start-stop script y redirecciones de puertos.
#
#
# redirect FROM TO PROTOCOL
# setup port redirect using iptables
redirect() {
echo "Redirecting port $1 to $2 ($3)"
iptables -t nat -A PREROUTING -p $3 –dport $1 -j REDIRECT –to-port $2
}
#
# setup_iptables
# setup iptables for redirection of CIFS and FTP
setup_iptables () {
echo 1 >/proc/sys/net/ipv4/ip_forward
modprobe iptable_nat
# Clear NATing tables
iptables -F
iptables -t nat -F
iptables -P INPUT ACCEPT
iptables -P FORWARD ACCEPT
iptables -P OUTPUT ACCEPT
# HTTP Nating
redirect 80 8080 tcp
# FTP NATing
redirect 21 1121 tcp
# CIFS NATing
redirect 445 1445 tcp
redirect 139 1139 tcp
redirect 137 1137 udp
redirect 138 1138 udp
}
case "$1" in
'start')
Xvfb :1 -screen 0 1024x768x24 -fbdir /usr/src &
/usr/lib/openoffice.org/program/soffice "-accept=socket,host=localhost,port=8100;urp;StarOffice.ServiceManager" -nofirststartwizard -nologo -headless -display :1 &
echo "Setting up iptables …"
setup_iptables
;;
esac
Content from pre 2016 and from language groups that have been closed.
Content is read-only.
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.