Last active
August 17, 2018 18:42
-
-
Save bspavel/bfacdcb28857c42df2189ff5e2b84465 to your computer and use it in GitHub Desktop.
the installer of the scan server on the raspberry pi
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| #https://feeding.cloud.geek.nz/posts/setting-up-a-network-scanner-using-sane/ | |
| #https://askubuntu.com/questions/762702/failed-to-start-saned-service-unit-saned-service-is-masked | |
| #http://www.ekzorchik.ru/2017/09/print-server-cups-on-raspberry-pi-3/ | |
| #https://habrahabr.ru/post/328576/ | |
| #https://wiki.debian.org/ru/HowTo/ChangeHostname | |
| #http://help.ubuntu.ru/wiki/сканеры_решение_общих_проблем_с_подключением | |
| #http://www.sane-project.org/sane-mfgs.html#Z-CANON | |
| #https://feeding.cloud.geek.nz/posts/setting-up-a-network-scanner-using-sane/ | |
| #https://wiki.contribs.org/SANE | |
| #https://dev.shyd.de/2011/03/debian-printserver-scanserver-hplip-cups-sane/ | |
| #https://kbpdfstudio.qoppa.com/how-to-solve-failed-to-start-saned-service-unit-saned-service-is-masked-on-linux/ | |
| #https://feeding.cloud.geek.nz/posts/setting-up-a-network-scanner-using-sane/ | |
| #https://askubuntu.com/questions/762702/failed-to-start-saned-service-unit-saned-service-is-masked | |
| #https://help.ubuntu.com/community/SaneDaemonTutorial | |
| #https://habrahabr.ru/post/242513/ | |
| #https://stackoverflow.com/questions/2642585/read-a-variable-in-bash-with-a-default-value | |
| sudo apt-get install sane -y | |
| sudo sane-find-scanner | |
| sudo apt-get update | |
| sudo apt-get install -y sane xsane xsane-common sane-utils libsane \ | |
| libsane-common libsane-dbg libsane-dev libsane-extras \ | |
| libsane-extras-common libsane-extras-dev | |
| sudo apt-get update | |
| sudo apt-get install -y libsane-extras-dbg | |
| sudo groupadd scanner | |
| sudo gpasswd -a saned scanner | |
| sudo sane-find-scanner | |
| sed -i "s#^RUN=no#RUN=yes#" /etc/default/saned | |
| sudo systemctl start saned.socket | |
| sudo systemctl enable saned.socket | |
| read -n 1 -s -r -p "Press any key to continue" | |
| echo "Please, edit scanner server access list" | |
| echo "edit /etc/sane.d/saned.conf" | |
| echo "Then edit firewall rules: /etc/network/iptables" | |
| echo "iptables -A INPUT -s 'IP-address' -p tcp --dport 6566 -j ACCEPT" | |
| echo "iptables -A INPUT -s 'IP-address' -p udp -j ACCEPT" | |
| echo "service iptables restart" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment