HEX
Server: Apache/2.2.34 (Unix) mod_fastcgi/mod_fastcgi-SNAP-0910052141
System: Linux Kou-Etsu-Dou 4.4.59+ #25556 SMP PREEMPT Thu Mar 4 18:03:46 CST 2021 x86_64
User: hosam (1026)
PHP: 7.2.29
Disabled: NONE
Upload Files
File: //etc/init/gcpd.conf
description "google cloud print daemon"
author "System Integration Team"
normal exit 0

start on started cupsd
stop on stopping cupsd

console log
expect fork

respawn
respawn limit 5 10

pre-start script
	GCP_NUM=`/usr/syno/bin/synoprint --list | xargs -n 1 /usr/syno/bin/synoprint --ckgcp $1 | grep on | wc -l` || true

	if [ ${GCP_NUM} -ne 1 ]; then
		stop; exit 0
	fi

	if ! /usr/syno/sbin/synoservice --status cupsd > /dev/null 2>&1; then
		echo "cupsd is not running, exit."
		stop; exit 0;
	fi
end script

exec /usr/bin/gcpd
post-stop exec sleep 2