Skip to content

Conversation

@drbitboy
Copy link

I added an optional time.sleep(20) to make it work during system boot using the provided /etc/init.d/cloudprint for ubuntu under a user named cloudprint. The wait is controlled by the new command-line option -w.

I also added system install instructions to the README to create the user and to start cloudprint during boot.

I believe the problem was that, although the network had started, some resource was not yet available e.g. perhaps resolv.conf was not yet populated with DNS IPs from DHCP; I don't like this approach (a hard-coded timer) but it does work on my laptop and on a clean system using http://instantserver.io/.

@davesteele
Copy link
Contributor

I don't think a delay is called for. See the comment on 53b083f0 for a probable fix.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think for --chuid and --group you want to replace $CPNAME with $CPUSER.

@davesteele
Copy link
Contributor

@clonemeagain
Copy link

Just in case, this is my upstart script, use as you will:

$ cat /etc/init/cloudprint.conf

description "cloudprint.py - Use CUPS printers with Google Cloudprint"

start on (filesystem and net-device-up)
stop on shutdown
respawn

console log

setuid root
env HOME=/root
env USER=root

exec /opt/cloudprint/cloudprint/cloudprint.py

Works great on Trusty! (obviously, change exec line to your install)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants