managed-install-not-installing-automatically

290 views
Skip to first unread message

Sujithkumar G Suriyamurthy

unread,
Jan 13, 2024, 8:17:16 AMJan 13
to munki-discuss
Under managed install I have added an app as required app but it does not install automatically instead it shows that it will be installed and even after waiting like 10-20 mins still it remains the same. Later I have to click on update all to install the app.

On the other hand, using munki admin tools, I chose restart required and from munki app it shows under the app that a restart is required but its not happending automatically. I also tried postinstall script but that also failing to do the job. 

I have attached the package info (plist) for your info and please support if it looks ok or is there anything needs to be changed. 

Please support.


jamfapp.plist

Alan

unread,
Jan 13, 2024, 10:38:39 AMJan 13
to munki-...@googlegroups.com
This actually sounds exactly like expected behavior. You have a key in there saying it requires a restart, so it's not just going to install by itself. It requires the user to update, so Managed Software Center can log out and restart after installing the item.

If you want that to force install, you need to use the force_install_after_date key.

That said, does this need a restart, if you expect it to just install in the background? If it doesn't require a restart, take out the RestartAction key and leave in unattended_install as true, and you should be good.

--
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/bba5b59d-472a-48b5-bdb3-424f545c572an%40googlegroups.com.

Sujithkumar Govindan Suriyamurthy

unread,
Jan 13, 2024, 12:37:20 PMJan 13
to munki-...@googlegroups.com

This actually sounds exactly like expected behavior. You have a key in there saying it requires a restart, so it's not just going to install by itself. It requires the user to update, so Managed Software Center can log out and restart after installing the item.

 

Copy that. Thanks

 

If you want that to force install, you need to use the force_install_after_date key.

 

So what would be the option to select from the munki admin app UI to forcefully install an app OR  is it something like a custom key that does not show up in the munki admin app UI?

 

That said, does this need a restart, if you expect it to just install in the background? If it doesn't require a restart, take out the RestartAction key and leave in unattended_install as true, and you should be good.

 

In fact, the app which I am trying to install does not automatically restart. Instead I wanted to forcefully restart after the app is installed, so from the munki admin app, there is an option called post install script, here I have used the following command but that did not take effect. What should be the right key if I would like to forcefully restart the device after the app is installed?

 

<key>postinstall_script</key>

    <string>#!/bin/bash

 

sudo shutdown -r now

</string>

 

last one is about the requirements section in the munki admin app, I have another app where I want it to be installed after a required app is installed, with the munki admin app,  you can add a requirement app to be installed first so the plist looks like below and in the same app, I have also added a pre-install-script to install another app, so here my question is which one takes the precedence first "RequiredApps Or PreinstallScript"? 

 

<key>requires</key>

    <array>

        <string>JamfConnect</string>

        <string>JamfConnectLaunchAgent</string>

    </array>

 

 

<key>postinstall_script</key>

    <string>#!/bin/bash

 

sudo shutdown -r now

</string>

 

please support.

 


You received this message because you are subscribed to a topic in the Google Groups "munki-discuss" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/munki-discuss/lNmFFC0Zpbs/unsubscribe.
To unsubscribe from this group and all its topics, send an email to munki-discus...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/munki-discuss/CAE%2BBptxSwh-4hPpHwoD1A%3DKHVNjdgWmkCdTrLDQL%3DpXL8CNMKA%40mail.gmail.com.

Alan

unread,
Jan 13, 2024, 10:12:21 PMJan 13
to munki-...@googlegroups.com
You don't need a separate postinstall_script in order to reboot. If you say to require a reboot, Munki will do a reboot after installing the item. But, as I said before, Munki will just wait for the user to install the item requiring a reboot via Managed Software Center, unless you use a force_install_after_date key (in MunkiAdmin, this is the Force Install After Date option under Basic Info—but MunkiAdmin is just a GUI frontend for editing the XML in the plist/pkginfo file).

preinstall_script and requires are completely different things.

requires means "Munki must install these other items before installing this item."

preinstall_script means "Munki must run this arbitrary script before installing this item."

Not the same at all. The first ensures the prerequisites are installed. The latter runs a script.


Sujithkumar Govindan Suriyamurthy

unread,
Jan 14, 2024, 7:47:22 AMJan 14
to munki-...@googlegroups.com


You don't need a separate postinstall_script in order to reboot. If you say to require a reboot, Munki will do a reboot after installing the item. But, as I said before, Munki will just wait for the user to install the item requiring a reboot via Managed Software Center, unless you use a force_install_after_date key (in MunkiAdmin, this is the Force Install After Date option under Basic Info—but MunkiAdmin is just a GUI frontend for editing the XML in the plist/pkginfo file).

You say without a need of using restart command in the postinstall_script Munki is able to reboot the device after it is installed but in the second line you have mentioned that Munki will wait for the user to install the items requiring a reboot via Managed Software Center, so this means, if there are managed (required) Or optional install apps needs reboot then Munki will wait for all the apps to be installed either user OR managed install initiated then it will go for restart, is that what you are saying?  if it is true then what I am trying to achieve may not work.  

image.png

Here is what I am trying to achieve as follows

I am kind of creating dependencies between the managed install apps. (required apps) but NOT for optional apps. Here is the condition as follows. 

1) On the first logon to a Mac desktop, our MDM installs the Munki app. Subsequently, Munki installs Apps A and B and should initiate an immediate restart without user consent (forced reboot). 

   [I do not want Munki to delay the restart for other apps that require it. To ensure this, I believe I should avoid selecting the 'required reboot' option for any other apps. Otherwise, Munki will wait for the user to click "update all" in the UI, which will           trigger the installation of the apps and then reboot. This process is to prevent multiple reboots, correct?]

2) Once Apps A and B are detected as installed, App C should then be installed. I assume this is the purpose of the key mentioned below, ensuring that Apps A and B are installed before App C.
     
    <key>requires</key>
<array>
<string>App A</string>
<string>App B</string>
</array>

3) After confirming App C is installed, install all other required apps (managed installs like App D, E, F, G, etc.). Each of these apps will have a specific key, ensuring they can only be installed after App C is in place.

     <key>requires</key>
<array>
<string>App C</string>
</array>

This is the sequence I wanted it to go but App A & B cannot be rebooted without user's interaction, this is my understanding based on your first reply and this key "force_install_after_date" is not helpful for me to achieve my goal mentioned above. 

 FYI - Here in this email I have used several times managed install or required apps, it is nothing but as shown below

      image.png

Please support me here.

Regards
Sujith

Sujithkumar Govindan Suriyamurthy

unread,
Jan 14, 2024, 8:44:49 AMJan 14
to munki-...@googlegroups.com

As suggested from your last to last email, I have removed postintall_scrpt, added unattended_install key to true, and also set the restart action = "None" still it says "will be installed" but not installing automatically and it looks like expecting the user to click on üpdate all". 

image.png

Is it the default behavior?  Is there a way to make it auto-install without user interaction? 

Regards
Sujith

Alan

unread,
Jan 14, 2024, 11:21:48 AMJan 14
to munki-...@googlegroups.com
I think you need to go back to basics first. Have you done https://github.com/munki/munki/wiki/Demonstration-Setup? You may also want to have a look at https://github.com/munki/munki/wiki/Launchd-Jobs-and-Changing-When-Munki-Runs and other parts of the wiki to understand Munki. Even your catalogs are oddly named. I mean, technically, you can call your catalogs whatever you want, but the fact you've named your catalogs RequiredApps and AvailableApps indicates you may not fully understand what catalogs are for (as opposed to managed installs or optional installs): https://github.com/munki/munki/wiki/Using-Munki-Catalogs

In terms of deploying Munki with an MDM, and then having Munki install a bunch of stuff, you may want to look into https://gitlab.com/Mactroll/DEPNotify or https://github.com/setup-your-mac/Setup-Your-Mac and have it set Munki to bootstrap mode and then log out afterwards: https://github.com/munki/munki/wiki/Bootstrapping-With-Munki. Based on the problems you're running into and the questions you're asking, I don't think you're quite there yet.

It sounds as if you're trying to do too much with Munki without having a basic understanding of Munki. I think you should start with the basics first: https://github.com/munki/munki/wiki/Demonstration-Setup

Another thing you may want to avail yourself of is the Munki channel on the MacAdmins Slack. Lots of folks want to help here on Munki Discuss, but Slack is more conducive to quick back-and-forth help than a mailing list is (just my opinion).

Sujithkumar Govindan Suriyamurthy

unread,
Jan 14, 2024, 1:48:23 PMJan 14
to munki-...@googlegroups.com

To answer your question, I am not aiming to have multiple environments such as testing, development, and production. I get that about the catalog, and please forget about the name set on those, as I used it for just testing. 

Please Note: Our MDM (Intune) isn't capable of installing apps or config profiles during the enrollment process, and there is no room for customization to drive setup assistance. This means the profile for automatic device enrollment does have the option to add custom scripts, apps, profiles, etc. The app deployment via Intune takes a lot of time as it depends on the Intune Service CDNs, which is why I wanted to try out Munki, where I can use our repository.


In my opinion, for a beginner to Munki, the MunkiAdmin app would be a good tool to start with because it explains fairly what options can be used with Munki and also enables us to view how it updates the keys in each app's (.plist) after the changes are made from this UI shown below. This helps greatly to control apps' behavioral configuration. With this tool, I can test whatever features show up in there, and of course, going deep dive would always go the extra mile towards Munki, but in my opinion, as a starter, MunkiAdmin would be just enough.

image.png


The most important section that made my life easier is the Manifest shown below, it is similar to Intune's app assignment where I can define what apps need to be managed install and optional install
image.png

As long as the MunkiAdmin app makes the changes, whatever I want to do with the app, I am ok with that. 

I again tested after having this key, "unattended_install," and still it says "will be installed," but it is not getting installed automatically after the Munki app is in place.

Therefore, the question is, is it by default that user interaction is needed, or else it won't install?


Regards
Sujith














Sujithkumar Govindan Suriyamurthy

unread,
Jan 14, 2024, 2:08:47 PMJan 14
to munki-...@googlegroups.com


Even with the following key, it does not install automatically, and user interaction is still required.

<key>forced_install</key>
<true/>

Please assist.

Regards
Sujith

Alan

unread,
Jan 14, 2024, 2:38:16 PMJan 14
to munki-...@googlegroups.com
On Sun, Jan 14, 2024 at 10:48 AM Sujithkumar Govindan Suriyamurthy <suji...@gmail.com> wrote:

Even with the following key, it does not install automatically, and user interaction is still required.

<key>forced_install</key>
<true/>

That link is from 2011. If you go to https://github.com/munki/munki/wiki/Supported-Pkginfo-Keys, you'll see This is Deprecated. Use unattended_install
 
To answer your question, I am not aiming to have multiple environments such as testing, development, and production. I get that about the catalog, and please forget about the name set on those, as I used it for just testing. 

That's fine—you can have only production or stable or ready. I was just merely remarking that the names you chose indicated you didn't fully grasp what catalogs were for.
 

Please Note: Our MDM (Intune) isn't capable of installing apps or config profiles during the enrollment process, and there is no room for customization to drive setup assistance. This means the profile for automatic device enrollment does have the option to add custom scripts, apps, profiles, etc. The app deployment via Intune takes a lot of time as it depends on the Intune Service CDNs, which is why I wanted to try out Munki, where I can use our repository.


Munki's fine for this. That's why I linked you to DEPNotify and Setup Your Mac. Have your MDM install Munki, and have Munki do the rest in bootstrap mode. Did you have a look at the bootstrap mode link I showed you earlier?
 

In my opinion, for a beginner to Munki, the MunkiAdmin app would be a good tool to start with because it explains fairly what options can be used with Munki and also enables us to view how it updates the keys in each app's (.plist) after the changes are made from this UI shown below. This helps greatly to control apps' behavioral configuration. With this tool, I can test whatever features show up in there, and of course, going deep dive would always go the extra mile towards Munki, but in my opinion, as a starter, MunkiAdmin would be just enough.

I have no qualms with MunkiAdmin. I use it myself. My main issue is I don't think you've read up enough on the basics of how Munki works. Nothing you're describing is unexpected behavior.
 

image.png


The most important section that made my life easier is the Manifest shown below, it is similar to Intune's app assignment where I can define what apps need to be managed install and optional install
image.png

As long as the MunkiAdmin app makes the changes, whatever I want to do with the app, I am ok with that. 

I again tested after having this key, "unattended_install," and still it says "will be installed," but it is not getting installed automatically after the Munki app is in place.


It means at the next background run, Munki will try to install it without bothering the user. By default, Munki runs in the background every 1-2 hours. More details in this link I sent you earlier. Please read it: https://github.com/munki/munki/wiki/Launchd-Jobs-and-Changing-When-Munki-Runs

If you manually launch up Managed Software Center, that's not the same as doing a background run.

I'd also recommend again having a look at this link I sent you earlier: https://github.com/munki/munki/wiki/Bootstrapping-With-Munki

And I'd also recommend again that your issues (multiple, it seems) will be better addressed in the quick format of the MacAdmins Slack (which you can sign up for for free) rather than emails back and forth on a mailing list. Keep in mind that every time you or I respond, everyone on the mailing list gets these responeses.

 

Gregory Neagle

unread,
Jan 14, 2024, 2:39:04 PMJan 14
to 'Gregory Neagle' via munki-discuss
If a user is logged in, Munki will not automatically install an item that requires a restart, even if it is marked for unattended_install (or the deprecated forced_install).

If a restart is required, user interaction is requird.

1) On the first logon to a Mac desktop, our MDM installs the Munki app. Subsequently, Munki installs Apps A and B and should initiate an immediate restart without user consent (forced reboot). 


This (in my opinion) is terrible user experience, and therefore Munki doesn’t support this directly.

Think about it from the user’s perspective. They login and start using the machine. Then, a minute or two later, without warning, the machine restarts, potentially causing lost work/data.

The expected and supported behavior is that Munki _downloads_ the item that requires a restart, then notifies the user of a pending software install that requires a reboot. This way the user if not caught unaware.

I’m not saying you cannot do what you want, but Munki isn’t designed to help you do this.

Perhaps you could explain _why_ you need this user-unfriendly behavior and we could perhaps offer alternatives.

As for other items, marked for unattended_install, that do not require a logout or restart — Munki _will_ install them without user interaction, but only during a periodic background run — the Munki runs that happen approximately once an hour in the background.

Any run initiated by Managed Software Center is by definition one that includes user interaction, and will wait for user interaction to proceed.

-Greg

On Jan 14, 2024, at 11:08 AM, Sujithkumar Govindan Suriyamurthy <suji...@gmail.com> wrote:


Even with the following key, it does not install automatically, and user interaction is still required.

<key>forced_install</key>
<true/>

Please assist.

Regards
Sujith

On Sun, Jan 14, 2024 at 7:47 PM Sujithkumar Govindan Suriyamurthy <suji...@gmail.com> wrote:

To answer your question, I am not aiming to have multiple environments such as testing, development, and production. I get that about the catalog, and please forget about the name set on those, as I used it for just testing. 

Please Note: Our MDM (Intune) isn't capable of installing apps or config profiles during the enrollment process, and there is no room for customization to drive setup assistance. This means the profile for automatic device enrollment does have the option to add custom scripts, apps, profiles, etc. The app deployment via Intune takes a lot of time as it depends on the Intune Service CDNs, which is why I wanted to try out Munki, where I can use our repository.


In my opinion, for a beginner to Munki, the MunkiAdmin app would be a good tool to start with because it explains fairly what options can be used with Munki and also enables us to view how it updates the keys in each app's (.plist) after the changes are made from this UI shown below. This helps greatly to control apps' behavioral configuration. With this tool, I can test whatever features show up in there, and of course, going deep dive would always go the extra mile towards Munki, but in my opinion, as a starter, MunkiAdmin would be just enough.

<image.png>


The most important section that made my life easier is the Manifest shown below, it is similar to Intune's app assignment where I can define what apps need to be managed install and optional install
<image.png>

As long as the MunkiAdmin app makes the changes, whatever I want to do with the app, I am ok with that. 

I again tested after having this key, "unattended_install," and still it says "will be installed," but it is not getting installed automatically after the Munki app is in place.

Therefore, the question is, is it by default that user interaction is needed, or else it won't install?


Regards
Sujith













On Sun, Jan 14, 2024 at 5:21 PM Alan <alan...@gmail.com> wrote:
I think you need to go back to basics first. Have you done https://github.com/munki/munki/wiki/Demonstration-Setup? You may also want to have a look at https://github.com/munki/munki/wiki/Launchd-Jobs-and-Changing-When-Munki-Runs and other parts of the wiki to understand Munki. Even your catalogs are oddly named. I mean, technically, you can call your catalogs whatever you want, but the fact you've named your catalogs RequiredApps and AvailableAppsindicates you may not fully understand what catalogs are for (as opposed to managed installs or optional installs): https://github.com/munki/munki/wiki/Using-Munki-Catalogs

In terms of deploying Munki with an MDM, and then having Munki install a bunch of stuff, you may want to look into https://gitlab.com/Mactroll/DEPNotify or https://github.com/setup-your-mac/Setup-Your-Mac and have it set Munki to bootstrap mode and then log out afterwards: https://github.com/munki/munki/wiki/Bootstrapping-With-Munki. Based on the problems you're running into and the questions you're asking, I don't think you're quite there yet.

It sounds as if you're trying to do too much with Munki without having a basic understanding of Munki. I think you should start with the basics first: https://github.com/munki/munki/wiki/Demonstration-Setup

Another thing you may want to avail yourself of is the Munki channel on the MacAdmins Slack. Lots of folks want to help here on Munki Discuss, but Slack is more conducive to quick back-and-forth help than a mailing list is (just my opinion).
On Sun, Jan 14, 2024 at 5:44 AM Sujithkumar Govindan Suriyamurthy <suji...@gmail.com> wrote:

As suggested from your last to last email, I have removed postintall_scrpt, added unattended_install key to true, and also set the restart action = "None" still it says "will be installed" but not installing automatically and it looks like expecting the user to click on üpdate all". 

<image.png>

Is it the default behavior?  Is there a way to make it auto-install without user interaction? 

Regards
Sujith
On Sun, Jan 14, 2024 at 1:46 PM Sujithkumar Govindan Suriyamurthy <suji...@gmail.com> wrote:


You don't need a separate postinstall_script in order to reboot. If you say to require a reboot, Munki will do a reboot after installing the item. But, as I said before, Munki will just wait for the user to install the item requiring a reboot via Managed Software Center, unless you use a force_install_after_date key (in MunkiAdmin, this is the Force Install After Date option under Basic Info—but MunkiAdmin is just a GUI frontend for editing the XML in the plist/pkginfo file).

You say without a need of using restart command in the postinstall_script Munki is able to reboot the device after it is installed but in the second line you have mentioned that Munki will wait for the user to install the items requiring a reboot via Managed Software Center, so this means, if there are managed (required) Or optional install apps needs reboot then Munki will wait for all the apps to be installed either user OR managed install initiated then it will go for restart, is that what you are saying?  if it is true then what I am trying to achieve may not work.  

<image.png>

Here is what I am trying to achieve as follows

I am kind of creating dependencies between the managed install apps. (required apps) but NOT for optional apps. Here is the condition as follows. 

1) On the first logon to a Mac desktop, our MDM installs the Munki app. Subsequently, Munki installs Apps A and B and should initiate an immediate restart without user consent (forced reboot). 

   [I do not want Munki to delay the restart for other apps that require it. To ensure this, I believe I should avoid selecting the 'required reboot' option for any other apps. Otherwise, Munki will wait for the user to click "update all" in the UI, which will           trigger the installation of the apps and then reboot. This process is to prevent multiple reboots, correct?]

2) Once Apps A and B are detected as installed, App C should then be installed. I assume this is the purpose of the key mentioned below, ensuring that Apps A and B are installed before App C.
     
    <key>requires</key>
<array>
<string>App A</string>
<string>App B</string>
</array>

3) After confirming App C is installed, install all other required apps (managed installs like App D, E, F, G, etc.). Each of these apps will have a specific key, ensuring they can only be installed after App C is in place.

     <key>requires</key>
<array>
<string>App C</string>
</array>

This is the sequence I wanted it to go but App A & B cannot be rebooted without user's interaction, this is my understanding based on your first reply and this key "force_install_after_date" is not helpful for me to achieve my goal mentioned above. 

 FYI - Here in this email I have used several times managed install or required apps, it is nothing but as shown below

Sujithkumar Govindan Suriyamurthy

unread,
Jan 14, 2024, 4:15:34 PMJan 14
to munki-...@googlegroups.com
According to Bootstrapping With Munki, it says "Create a Bootstrap File: On the client machine, create an empty file named .com.googlecode.munki.checkandinstallatstartup. The location for this file is usually /Users/Shared/. This file signals Munki to perform a check and install software at the next startup. This is crucial for the bootstrapping process.". If this is crucial, then with Intune MDM not possible because Intune Management Extension agent is installed and ready to deploy scripts is possible only after user arrive at the desktop. 

Ref: https://learn.microsoft.com/en-us/mem/intune/apps/lob-apps-macos-agent#how-is-the-agent-installed

This is one of major limitation from Intune, all apps, scripts, configuration profiles are pushed out to the devices at least 5-10 mins after user is at the desktop. Hence,  creating this file ".com.googlecode.munki.checkandinstallatstartup"under this location is not possible "/Users/Shared/" during the enrolment.

Probably, if the OS image is customised with Munki then it should work but in our case we reply on Zero-Touch deployment without having a golden image concept.
Regards

Sujith


Sujithkumar Govindan Suriyamurthy

unread,
Jan 16, 2024, 2:14:31 PMJan 16
to munki-...@googlegroups.com
I hope you're all doing well. I wanted to express my gratitude to have responded to my questions so far about [munki-discuss] managed-install-not-installing-automatically]. Your insights and suggestions were greatly appreciated.


However, I'm still facing the same challenge with having Munki to install apps automatically. Despite the valuable input I've received, I haven't found a solution that completely addresses this particular concern.

Please support

regards
Sujith

Alan

unread,
Jan 16, 2024, 2:22:55 PMJan 16
to munki-...@googlegroups.com
I'd recommend (and I did before, but you may have missed it in the back-and-forth of emails) looking into a DEPNotify, Setup Your Mac, or Swiftdialog workflow that basically has a user-friendly "Hey, we're doing stuff in the background" window. You can then have that process download Munki packages in the background, set Munki bootstrap mode, and then log out (at the login window, with bootstrap mode, Munki will install all pending items and reboot if necessary).

I'd also recommend once again looking into the MacAdmins Slack, which is more conducive to the back-and-forth type of support you're asking for than an email list is.

Gary Bernstein

unread,
Jan 16, 2024, 5:29:06 PMJan 16
to munki-...@googlegroups.com
Are you re-creating catalogs after you make changes to the pkg info files?
Thanks
-Gary

On Jan 16, 2024, at 1:22 PM, Alan <alan...@gmail.com> wrote:



Alan

unread,
Jan 16, 2024, 5:45:07 PMJan 16
to munki-...@googlegroups.com
You should always run makecatalogs after making changes to individual pkginfo files. That can take different forms (save button in MunkiAdmin, some kind of CI/CD pipeline, or manually invoking the command), but the end result is the same—the client Macs will look for catalogs (not pkginfo files) on the Munki server.

Reply all
Reply to author
Forward
0 new messages