O aplicativo de impressão ezeep para Mac pode ser implementado no ambiente da sua organização através da Munki, uma ferramenta de implementação de software.
Pré-requisitos:
Conhecimento prévio de trabalho com a ferramenta de software Munki.
Configuração
Importação do ezeep Blue Print App para o servidor Munki
1. Importar ezeep Print App.pkg:
munkiimport /Users/rwelz/Desktop/ezeep\ Print\ App.pkg
Item name: ezeep Print App
Display name: ezeep Print App
Description: enables printing over ezeep
Version: 1.0.30
Category: Printing
Developer: ThinPrint GmbH
Unattended install: False
Unattended uninstall: False
Catalogs: testing
Import this item? [y/N] y
Upload item to subdirectory path []:
No existing product icon found.
Attempt to create a product icon? [y/N] y
Attempting to extract and upload icon...
Imported icons/ezeep Print App_1.png
icons/ezeep Print App_2.png.
Copying ezeep Print App.pkg to repo...
Copied ezeep Print App.pkg to pkgs/ezeep Print App-1.0.30.pkg.
Edit pkginfo before upload? [y/N]: n
Saved pkginfo to pkgsinfo/ezeep Print App-1.0.30.
Rebuild catalogs? [y/N] y
Rebuilding catalogs at file:///Users/Shared/munki_repo...
Created icons/_icon_hashes.plist...
2. Edite os ícones:
remova o ícone errado e nomeie o ícone que você deseja manter, removendo o
• underscore und the number from the filename like in:
/Users/Shared/munki_repo/icons/ezeep Print App_1.png
/Users/Shared/munki_repo/icons/ezeep Print App_2.png
• remove
/Users/Shared/munki_repo/icons/ezeep Print App_1.png
• and rename
/Users/Shared/munki_repo/icons/ezeep Print App_2.png
to
/Users/Shared/munki_repo/icons/ezeep Print App.png
3. Então crie um novo catálogo com:
makecatalogs
Getting list of icons...
Hashing Firefox.png...
Hashing ezeep Print App.png...
Getting list of pkgsinfo...
Getting list of pkgs...
Adding pkgsinfo/ezeep Print App-1.0.30 to testing...
Adding pkgsinfo/apps/mozilla/Firefox-88.0.1 to testing...
Created catalogs/all...
Created catalogs/testing...
Created icons/_icon_hashes.plist…
4. Adicione o ezeep Print App.pkg importado ao manifesto:
manifestutil
Entering interactive mode... (type "help" for commands)
> add-catalog testing --manifest site_default
Catalog testing is already in manifest site_default.
> add-pkg ezeep\ Print\ App --manifest site_default
Added ezeep Print App to section managed_installs of manifest site_default.
> exit
5. Agora quando você abrir o Managed Software Center.app em um Mac configurado como cliente Munki, você verá um novo
atualização - mesmo quando é a primeira instalação do ezeep Blue Print App
Faça o cliente lançar automaticamente o ezeep Blue Print App após a instalação
Para fazer ezeep Blue Print App para iniciar automaticamente quando o usuário faz o login e instala as impressoras, o usuário é capaz de usar, nós precisamos adicionar um script ao arquivo pkgsvinfo do ezep Print App em um formato cotado:
1. Criar um novo arquivo e salvá-lo no destktop com um nome como munki_postinstall_script.txt
#!/bin/sh
if [ ! -d "/Library/PrivilegedHelperTools" ]
then
mkdir "/Library/PrivilegedHelperTools"
chmod 755 "/Library/PrivilegedHelperTools"
fi
if [ -f "/Library/PrivilegedHelperTools/com.thinprint.ezeep.ezeep-Print-App-launchOncePerUser-
helper" ]
then
rm "/Library/PrivilegedHelperTools/com.thinprint.ezeep.ezeep-Print-App-launchOncePerUser-
helper"
fi
cat << EOF > "/Library/PrivilegedHelperTools/com.thinprint.ezeep.ezeep-Print-App-launchOncePerUser-
helper"
#!/bin/sh
open "/Applications/ezeep Print App.app"
rm ~/Library/LaunchAgents/com.thinprint.ezeep.ezeep-Print-App-launchOnce.plist
EOF
chmod 755 "/Library/PrivilegedHelperTools/com.thinprint.ezeep.ezeep-Print-App-launchOncePerUser-
helper"
out=$(dscacheutil -q user | grep -A 3 -B 2 -e uid:\ 5'[0-9][0-9]' | grep "dir:" | sed -e
's/dir: //g')
for i in $out
do
j=$(basename "$i")
if [ ! -d "$i/Library/LaunchAgents" ]
then
mkdir "$i/Library/LaunchAgents"
chown "$j" "$i/Library/LaunchAgents"
chmod 755 "$i/Library/LaunchAgents"
fi
cat << EOF > "$i/Library/LaunchAgents/com.thinprint.ezeep.ezeep-Print-App-launchOnce.
plist"
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/Property-
List-1.0.dtd">
<plist version="1.0">
<dict>
<key>KeepAlive</key>
<false/>
<key>Label</key>
<string>com.thinprint.ezeep.ezeep-Print-App-launchOncePerUser</string>
<key>LimitLoadToSessionType</key>
<array>
<string>Aqua</string>
<string>StandardIO</string>
</array>
<key>ProgramArguments</key>
<array>
<string>/bin/bash</string>
<string>/Library/PrivilegedHelperTools/com.thinprint.ezeep.ezeep-Print-App-launchOncePerUser-
helper</string>
</array>
<key>RunAtLoad</key>
<true/>
</dict>
</plist>
EOF
chown "$j" "$i/Library/LaunchAgents/com.thinprint.ezeep.ezeep-Print-App-launchOnce.plist"
chmod 644 "$i/Library/LaunchAgents/com.thinprint.ezeep.ezeep-Print-App-launchOnce.plist"
done
exit 0
2. Copie o conteúdo deste script em munki_postinstall_script.txt.
3. Deixe Munki converter o conteúdo deste arquivo em um formato especial citado:
/usr/local/munki/makepkginfo --postinstall_script /Users/rwelz/Desktop/munki_postinstall_
script.txt
4. Copie a parte relevante da saída (entre <string> e </string> e cole-a no pkgsinfo
file together with the relevant xml key:
<string>#!/bin/sh
if [ ! -d "/Library/PrivilegedHelperTools" ]
then
mkdir "/Library/PrivilegedHelperTools"
chmod 755 „/Library/PrivilegedHelperTools"
…
…
…
chmod 644 "$i/Library/LaunchAgents/com.thinprint.ezeep.ezeep-Print-App-launchOnce.plist"
done
exit 0</string>
5. Colar isto no arquivo /Users/Shared/munki_repo/pkgsinfo/ezeep Print App-1.0.30 como:
<key>receipts</key>
<array>
<dict>
<key>installed_size</key>
<integer>7</integer>
<key>packageid</key>
<string>com.thinprint.ezeep.printapp.logging</string>
<key>version</key>
<string>1.0.30</string>
</dict>
<dict>
<key>installed_size</key>
<integer>764</integer>
<key>packageid</key>
<string>com.thinprint.ezeep.printapp.printerdriver</string>
<key>version</key>
<string>1.0.2</string>
</dict>
<dict>
<key>installed_size</key>
<integer>123565</integer>
<key>packageid</key>
<string>com.ThinPrint.TPAutoConnect</string>
<key>version</key>
<string>12.2.93</string>
</dict>
<dict>
<key>installed_size</key>
<integer>74015</integer>
<key>packageid</key>
<string>com.ThinPrint.TPAutoConnect.PPDGen</string>
<key>version</key>
<string>1.0.30</string>
</dict>
<dict>
<key>installed_size</key>
<integer>99173</integer>
<key>packageid</key>
<string>com.thinprint.ezeep.printapp</string>
<key>version</key>
<string>1.0.30</string>
</dict>
</array>
<key>postinstall_script</key>
<string>#!/bin/sh
if [ ! -d "/Library/PrivilegedHelperTools" ]
then
mkdir "/Library/PrivilegedHelperTools"
chmod 755 "/Library/PrivilegedHelperTools"
fi
if [ -f "/Library/PrivilegedHelperTools/com.thinprint.ezeep.ezeep-Print-App-launchOncePerUser-
helper" ]
then
rm "/Library/PrivilegedHelperTools/com.thinprint.ezeep.ezeep-Print-App-launchOncePerUser-
helper"
fi
cat << EOF > "/Library/PrivilegedHelperTools/com.thinprint.
ezeep.ezeep-Print-App-launchOncePerUser-helper"
#!/bin/sh
open "/Applications/ezeep Print App.app"
rm ~/Library/LaunchAgents/com.thinprint.ezeep.ezeep-Print-App-launchOnce.plist
EOF
chmod 755 "/Library/PrivilegedHelperTools/com.thinprint.ezeep.ezeep-Print-App-launchOncePerUser-
helper"
out=$(dscacheutil -q user | grep -A 3 -B 2 -e uid:\ 5'[0-9][0-9]' | grep "dir:" | sed -e
's/dir: //g')
for i in $out
do
j=$(basename "$i")
if [ ! -d "$i/Library/LaunchAgents" ]
then
mkdir "$i/Library/LaunchAgents"
chown "$j" "$i/Library/LaunchAgents"
chmod 755 "$i/Library/LaunchAgents"
fi
cat << EOF > "$i/Library/LaunchAgents/com.thinprint.ezeep.ezeep-Print-App-launchOnce.
plist"
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-
1.0.dtd">
<plist version="1.0">
<dict>
<key>KeepAlive</key>
<false/>
<key>Label</key>
<string>com.thinprint.ezeep.ezeep-Print-App-launchOncePerUser</string>
<key>LimitLoadToSessionType</key>
<array>
<string>Aqua</string>
<string>StandardIO</string>
</array>
<key>ProgramArguments</key>
<array>
<string>/bin/bash</string>
<string>/Library/PrivilegedHelperTools/com.thinprint.
ezeep.ezeep-Print-App-launchOncePerUser-helper</string>
</array>
<key>RunAtLoad</key>
<true/>
</dict>
</plist>
EOF
chown "$j" "$i/Library/LaunchAgents/com.thinprint.ezeep.ezeep-Print-App-launchOnce.plist"
chmod 644 "$i/Library/LaunchAgents/com.thinprint.ezeep.ezeep-Print-App-launchOnce.plist"
done
exit 0</string>
<key>unattended_install</key>
<true/>
<key>unattended_uninstall</key>
<false/>
<key>uninstall_method</key>
<string>removepackages</string>
<key>uninstallable</key>
<true/>
<key>version</key>
<string>1.0.30</string>
<key>RestartAction</key>
<string>RequireRestart</string>
</dict>
</plist>
6. Call:
/usr/local/munki/makecatalogs
para fazer Munki reconhecer as mudanças no arquivo pkgsinfo.