{"id":20832257,"url":"https://github.com/scbd/printsmart-agent","last_synced_at":"2026-04-14T12:34:09.817Z","repository":{"id":148913325,"uuid":"20654822","full_name":"scbd/printsmart-agent","owner":"scbd","description":null,"archived":false,"fork":false,"pushed_at":"2020-07-15T19:44:05.000Z","size":53,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":12,"default_branch":"master","last_synced_at":"2025-01-18T20:40:47.308Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/scbd.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2014-06-09T17:05:34.000Z","updated_at":"2020-07-30T12:25:48.000Z","dependencies_parsed_at":"2023-07-25T06:30:26.029Z","dependency_job_id":null,"html_url":"https://github.com/scbd/printsmart-agent","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scbd%2Fprintsmart-agent","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scbd%2Fprintsmart-agent/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scbd%2Fprintsmart-agent/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scbd%2Fprintsmart-agent/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/scbd","download_url":"https://codeload.github.com/scbd/printsmart-agent/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243182600,"owners_count":20249661,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-18T00:10:59.128Z","updated_at":"2025-12-24T12:58:38.276Z","avatar_url":"https://github.com/scbd.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SCBD PrintSmart\n\nSCBD PrintSmart Agent Sends Print-on-Demand request to venue PrintSmart-enabled printers.\n\n### Build \u0026 Run\n\nBuild\n```\n$ docker build -t printsmart-agent git@github.com:scbd/printsmart-agent.git\n```\n\nRun (daemon)\n```\n$ docker run -d --name ps --restart always -e INSTANCE_ID=$(hostname) -v /path/to/config/config.json:/config/config.json -p 631:631 scbd/printsmart-agent\n```\n\nLogs\n```\n$ docker logs -f ps\n```\n\n### Sample config file\n\n```javascript\n{\n    \"aws\": {\n        \"accountId\": \"12345674869\",\n        \"accessKeyId\": \"SECRET\",\n        \"secretAccessKey\": \"SECRET\"\n    },\n    \"queues\" : {\n        \"print\"           : \"PrintSmart_print\",\n        \"reportJobStatus\" : \"PrintSmart_jobStatusReport\",\n        \"updateJobStatus\" : \"PrintSmart_updateJobStatus_{instanceId}\"\n    },\n    \"postscript\" : {\n        \"level\" : 1,\n        \"paper\" : \"letter\"\n    },\n    \"printers\" : {\n        \"ps1\" : {\n            \"endpoint\"    : \"ipp://0.0.0.1/ipp\",\n            \"driver\"      : \"drv:///sample.drv/generic.ppd\",\n            \"description\" : \"PrintSmart\",\n            \"location\"    : \"Doc Distribution\"\n        },\n        \"ps2\" : {\n            \"endpoint\"    : \"ipp://0.0.0.2/ipp\",\n            \"driver\"      : \"drv:///sample.drv/generic.ppd\",\n            \"description\" : \"PrintSmart\",\n            \"location\"    : \"Doc Distribution\"\n        },\n        \"ps3\" : {\n            \"endpoint\"    : \"ipp://0.0.0.3/ipp\",\n            \"driver\"      : \"drv:///sample.drv/generic.ppd\",\n            \"description\" : \"PrintSmart-Backup\",\n            \"location\"    : \"Doc Distribution\"\n        }\n    },\n    \"classes\" : {\n        \"default\"   : [\"ps1\", \"ps2\"],\n        \"printshop\" : [\"ps1\", \"ps2\"]\n    }\n}\n```\n\n### SSH Reverse tunnel connection\n```\n$ ssh -A -L 21631:localhost:631 -o \"ProxyCommand=ssh -A user@public.server netcat localhost 2122\" ubuntu@localhost -p 2122 $@\n```\nauto ssh\n```\n$ sudo nano /etc/systemd/system/autossh-tunnel.service\n```\nautossh-tunnel.service\n```\n[Unit]\nDescription=SSH reverse tunnel service\nAfter=network.target\n\n[Service]\nEnvironment=\"AUTOSSH_GATETIME=0\"\nExecStart=/usr/bin/autossh -M 0 -N -i /home/ubuntu/.ssh/id_rsa -o ServerAliveInterval=15 -o ServerAliveCountMax=2 -o StrictHostKeyChecking=no -o ExitOnForwardFailure=yes -o StrictHostKeyChecking=no -R 2122:localhost:22 user@public.server -v\n\n[Install]\nWantedBy=multi-user.target\n```\n\n```\n$ sudo systemctl daemon-reload\n$ sudo systemctl start autossh-tunnel.service\n$ sudo systemctl enable autossh-tunnel.service\n$ sudo systemctl status autossh-tunnel\n```\n\n_server_\nadd to /etc/ssh/sshd_config\n```\nClientAliveInterval 15\n```\n### Useful CUPS Command lines\n\nList drivers\n```\n$ lpinfo -m\n```\n\nList printer\n```\n$ lpstat -p\n```\n\nAdd printer\n```\n$ lpadmin -p ps1 -v ipp://printer1.local/ipp -E -m drv:///sample.drv/generic.ppd -D \"PrintSmart\" -L 'Doc Distribution'\n$ lpadmin -p ps2 -v ipp://printer2.local/ipp -E -m drv:///sample.drv/generic.ppd -D \"PrintSmart\" -L 'Doc Distribution'\n$ lpadmin -p ps3 -v ipp://printer3.local/ipp -E -m drv:///sample.drv/generic.ppd -D \"PrintSmart Backup\" -L 'Doc Distribution'\n```\n* `raw` No driver (Direct print)\n* `everywhere` Query printer for driver (if available)\n* `drv:///sample.drv/generic.ppd` - Generic PostScript Printer\n* `drv:///sample.drv/generpcl.ppd` - Generic PCL Laser Printer\n\nRemove printer\n```\n$ lpadmin -r ps3\n\n```\n\nLits printers in a class\n```\n$ lpstat -c default\n```\n\nAdd printers to a class\n```\n$ lpadmin -p ps1 -c default\n$ lpadmin -p ps2 -c default\n$ lpadmin -p ps3 -c default\n$ cupsenable default\n$ cupsaccept default\n```\n\nRemove printers from a class\n```\n$ lpadmin -p ps3 -r default\n```\n\n# Setup server (ubuntu 16.04)\n\nNo password SUDO\n```\n$ visudo\n  %sudo   ALL=(ALL:ALL) NOPASSWD: ALL\n```\n\nmutlicast DNS, autossh etc\n```\n$ sudo apt-get update\n$ sudo apt-get install libnss-mdns autossh apt-transport-https ca-certificates curl software-properties-common\n```\n\n\nNo password and pubkey for ssh\n```\n$ sudo nano /etc/ssh/sshd_config\n  PubkeyAuthentication yes\n  PasswordAuthentication no\n```\n\nDocker\n```\ncurl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -\n$ sudo add-apt-repository \"deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable\"\n$ sudo apt-get update\n$ sudo apt-get install docker-ce\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscbd%2Fprintsmart-agent","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fscbd%2Fprintsmart-agent","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscbd%2Fprintsmart-agent/lists"}