Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
turboprint / usr / lib / turboprint / socketprint
Size: Mime:
#!/bin/sh

# socketprint - print to a tcp port on a network printer or printer server
# (c) ZEDOnet 2001

#
# The first parameter to the filter is the config file name.
#
CONFIG_FILE=$1

# Should read the following variables set in the config file:
#   REMOTESERVER
#   REMOTESOCKET

eval $(cat /etc/turboprint/system.cfg)
eval $(cat $CONFIG_FILE)

RETRY_COUNT=60

# echo "Socketprint to server $REMOTESERVER port $REMOTESOCKET" > /tmp/socketprint.log

while [ $RETRY_COUNT -gt 0 ] ; do
	$TPPATH_FILTERS/tpstdin --socketprint \
		$REMOTESERVER $REMOTESOCKET
	RESULT=$?
	if [ $RESULT -eq 0 ] ; then
		# echo "Socketprint successfull" >>/tmp/socketprint.log
		RETRY_COUNT=0
	else
		RETRY_COUNT=$[RETRY_COUNT-1]
		sleep 1
	fi
done