The doc I linked doesn’t specifically mention the condition “setting”.
It appears the “setting” condition in
if setting ~/config/settings/LaunchBox/main_settings autostart
decodes the flattened BMessage ~/config/settings/LaunchBox/main_settings and checks if there’s a field named “autostart” and sees if it’s true or false.
The documentation is severely lacking. The launch directory is for system services, the user_launch directory is for user services.
The ~/config/data/launch or user_launch directories will appear as-needed(when a package is installed which contains a file in that directory). However, the directories in ~/config are part of a separate packagefs mount from /system. This means that a package installed to /system/packages will use /system/data/user_launch and a package installed to ~/config/packages will use ~/config/data/user_launch.
I’m not sure if I understand the question properly, that “user launcher” is being run by the launch daemon. If you’re talking about creating launch_roster scripts outside of a package, then you can create/use the non-packaged directories. Like, /system/non-packaged/data/user_launch or ~/config/non-packaged/data/user_launch
Ok I’ve created the folder /boot/home/config/non-packaged/data/user_launch and put the script above but it’s not working.
postgresql is not exactly “outside of a package” because it’s installed via pkgman (postgresql12_server), however I would like to enhance it by starting the server via a user_launch
I was a little bit mistaken, the ~/config/non-packaged/data/user_launch doesn’t appear to be working, but the /system one does. Seems like a bug to me.
The launch script requires some changes too. The job should probably be switched to a service and you have an extra period in there after job, service x-vnd.postgresql. The on statement should be on initial_volumes_mounted. You may need to specify the full path to the pg_ctl command, I’m not sure of that.