author "System Integration Team"
description "Check if DS has a connected printer. If so, enable cups and cups-lpd."
start on runlevel 2
console log
task
script
PRINTER_NUM=`/usr/syno/bin/synoprint --list | wc -l` || true
if [ ${PRINTER_NUM} -gt 0 ]; then
echo "Printer exist. Start cupsd and cups-lpd." || true
/usr/syno/sbin/synoservice --start cupsd || true
/usr/syno/sbin/synoservice --start cups-lpd || true
fi
end script