Hi,
I'm running into a post install script issue trying to run a command to disable auto updates on slack following their official instructions: https://slack.com/intl/en-gb/help/articles/360035635174-Deploy-Slack-for-macOS
I'm using MunkiAdmin to manage this, however have double checked the plist and all seems to be in order.
Error: After installing and not having the desired effect I ran managedsoftwareupdate --installonly -vvv and found:
ERROR: Error executing script postinstall_script: [Errno 2] No such file or directory: '/tmp/munki-9l6adkg3/postinstall_script'
WARNING: Postinstall script for Slack returned -1
The script is very simple:
#!bin/bash
/usr/bin/defaults write /Users/$USER/Library/Preferences/com.tinyspeck.slackmacgap SlackNoAutoUpdates -bool YES
exit 0
If anybody has run into this issue and knows if I'm doing something stupid or knows how to resolve the issue that'd be great.
Thanks in advance!
Connor
Here is a copy of the pkginfo:
<?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>_metadata</key>
<dict>
<key>created_by</key>
<string>xxxxxxx</string>
<key>creation_date</key>
<date>2022-03-25T07:07:19Z</date>
<key>munki_version</key>
<string>5.5.0.4360</string>
<key>os_version</key>
<string>10.15.7</string>
</dict>
<key>autoremove</key>
<false/>
<key>catalogs</key>
<array>
<string>test</string>
<string>base</string>
</array>
<key>category</key>
<string>Communication</string>
<key>description</key>
<string>Slack is a platform for team communication: everything in one place, instantly searchable, available wherever you go.</string>
<key>developer</key>
<string>Slack</string>
<key>display_name</key>
<string>Slack</string>
<key>installer_item_hash</key>
<string>ace4ff8750236fc8bf08022d25b74f127fded538484495749c5002160700cfb9</string>
<key>installer_item_location</key>
<string>apps/slack/Slack-4.25.0.dmg</string>
<key>installer_item_size</key>
<integer>81675</integer>
<key>installer_type</key>
<string>copy_from_dmg</string>
<key>installs</key>
<array>
<dict>
<key>CFBundleIdentifier</key>
<string>com.tinyspeck.slackmacgap</string>
<key>CFBundleName</key>
<string>Slack</string>
<key>CFBundleShortVersionString</key>
<string>4.25.0</string>
<key>CFBundleVersion</key>
<string>6956</string>
<key>minosversion</key>
<string>10.11</string>
<key>path</key>
<string>/Applications/Slack.app</string>
<key>type</key>
<string>application</string>
<key>version_comparison_key</key>
<string>CFBundleShortVersionString</string>
</dict>
</array>
<key>items_to_copy</key>
<array>
<dict>
<key>destination_path</key>
<string>/Applications</string>
<key>source_item</key>
<string>Slack.app</string>
</dict>
</array>
<key>minimum_os_version</key>
<string>10.11</string>
<key>name</key>
<string>Slack</string>
<key>postinstall_script</key>
<string>#!bin/bash
/usr/bin/defaults write /Users/$USER/Library/Preferences/com.tinyspeck.slackmacgap SlackNoAutoUpdates -bool YES
exit 0</string>
<key>unattended_install</key>
<true/>
<key>uninstall_method</key>
<string>remove_copied_items</string>
<key>uninstallable</key>
<true/>
<key>version</key>
<string>4.25.0</string>
</dict>
</plist>
--
You received this message because you are subscribed to the Google Groups "munki-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to munki-discus...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/munki-discuss/d3c63beb-1655-4cb8-aae4-2c65b96507cdn%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/munki-discuss/63EB1CCB-CA00-4024-9FF2-F77AA8474BE5%40mac.com.
#!/bin/bash
currentUsersArray=( $(users) )
for i in "${currentUsersArray[@]}"
do
if [ ! -f /Users/$i/Library/Preferences/com.tinyspeck.slackmacgap ]
then
touch /Users/$i/Library/Preferences/com.tinyspeck.slackmacgap
fi
defaults write /Users/$i/Library/Preferences/com.tinyspeck.slackmacgap SlackNoAutoUpdates -bool YES
chown $i /Users/$i/Library/Preferences/com.tinyspeck.slackmacgap
done
exit 0
On Apr 12, 2022, at 4:58 AM, Connor Charalambides <charala...@gmail.com> wrote:
I managed to resolve the issue with the $USER variable.
To view this discussion on the web visit https://groups.google.com/d/msgid/munki-discuss/bb3a163d-eb38-44ec-9824-dd8c40971445n%40googlegroups.com.