Startup item and PackageMaker

I have a script which can wake a daemon up. I want to make a installation package which can install my applicatoin, daemon and create a startupitems to run that script to execute daemon when machine's startup. Any idea how can I do it in packagemaker. thank you!

You do not need a binary. Just the directory with the plist and script.
Create a directory:
/System/Library/StartupItems/amavisdstarter
Create a script called /System/Library/StartupItems/amavisdstarter/amavisdstarter with roughly the following contents (adjust to your needs):
#!/bin/sh
# amavisd startup item
. /etc/rc.common
StartService ()
/usr/bin/amavisd plusyour_parameters_as_you_usethem;
StopService ()
if [ -f /path/to/your/amavisd.pidfile ]; then
kill `cat /path/to/your/amavisd.pidfile` && rm -f /path/to/your/amavisd.pidfile
RETVAL=$?
[ $RETVAL -eq 0 ] && echo done. || echo failed.
else
echo not running.
fi
RestartService ()
StopService
sleep 1
StartService
RunService "$1"
Next create /System/Library/StartupItems/amavisdstarter/StartupParameters.plist:
Description = "amavisd content filter";
Provides = ("amavisd filter");
To manually start|stop amavisd issue:
/System/Library/StartupItems/amavisdstarter/amavisdstarter start|stop
It will start automatically on reboot.
HTH,
Alex
P.S. Not sure why the board mangles this. Instad of http... enclose "-f /path/to/your/amavisd.pidfile " and "$RETVAL -eq 0 " in square brackets
Message was edited by: pterobyte

Similar Messages

  • I cannot install Creative Suite 5.5 on my Windows 7 Professional. I keep getting error message: "Exit Code: 15 - Media DB sync failed". I have disabled UAC and Startup items and Services with no luck. Can you please help?

    I cannot install Creative Suite 5.5 on my Windows 7 Professional. I keep getting error message: "Exit Code: 15 - Media DB sync failed". I have disabled UAC and Startup items and Services with no luck. Can you please help?

    I am sorry Erickkasner but there is no longer direct support provided for Creative Suite 5.5 installation issues.
    You are welcome to post any specific errors you are able to discover within your installation log to this discussion.  Since you are using Windows then Exit Code 15 could mean one of the following:
    Installer database is corrupted
    Update pending to your operating system
    Improper permissions set for the Media.db
    The installation log file should provide additional insight into the exact error you are experiencing.  Please make sure to use the find command to look for the words 'ERROR' and 'FATAL' to locate the relevant error messages.

  • Firefox opens at startup on my iMac. It is not in startup items and not checked to open at login.

    There aren't really any more details to add. I have checked everything I can think of in the Library folder and thrown out anything I thought might affect it. Firefox is not set as my default browser.
    I have read many threads of people having this problem both here and on the Apple Support site. Most seem to be solved by unchecking "Open at Login" in the Dock icon or removing Firefox from the Startup Items in the System Preferences. Neither applies here. HELP!!! I like Firefox and use it from time to time but it seems the only way to stop this behavior is to remove it from my computer, which I will do if a solution can't be found.
    Thanks for your efforts.

    Yes. I checked all of the places I could think of and those mentioned in the threads I read. Login items is what I was referring to when I said, "removing Firefox from the Startup Items in the System Preferences".
    This is a nefarious problem!

  • A few months ago, my G5 started up with the address book and mail opened at startup. They are not in startup items, and I cannot get this to stop. Any suggestions?

    A few months ago, my power mac G5 began starting up with the address book and mail already open on the desk top.
    Neither of these is in my startup items, so I am at a loss as to stop this behavior.
    Any suggestions?

    Are they in Login items under System Preferences/Users/Login Items?
    In the Dock, right click the Address Book and Mail icons, select Options, and make sure "Open at Login" is not selected.

  • What are these startup items and are they harmfull

    Hello
    I Have a M55-S325. I have noticed some items on my startup list in system Configuration Utility
    TCtrlIOhook.exe
    TPSMain.exe
    Ltmoh.exe
    AGSMMSG.exe
    Apoint.exe
    TFncKy.exe
    So My Question is What are these and are they harmfull
    if so how do i remove them.
    PLEASE HELP

    Hi David,
    The items you have listed are genuine items use by your operating system although they may be stopped if you wish without doing any real harm. It will largely depend on whether you want to use any of the functions in which they are involved.
    For example, TCtrllOhook.exe and TPSMain.exe are associated with the Toshiba power management utility.
    Ltmoh.exe and AGRSMMSG.exe relate to you installed modem.
    Apoint.exe is associated with you pointing device (Touchpad or whatever).
    TFncKY.exe is related to the Toshiba function keys feature.
    Obviously, if you are not using your internal modem then the modem related items can be stopped without any ill effects, similarly the Toshiba Function keys.
    regards,

  • Login Startup Items

    I've updated my Tiger 10.4.10 to Leopard and now I am unable to open Settings -> User -> Startup Items. This opens an empty window after a while.

    Does it really say "Startup Items" and not "Login Items"? They stopped calling them "Startup Items" several OS X versions ago so if yours says "Startup Items", that could indicate some very strange failure to update certain components (this assumes you are using "English" as the localization). An "Archive and Install" might be warranted under such circumstances.
    Otherwise, you could try moving the "loginwindow.plist" file (not to be confused with the "com.apple.loginwindow.plist" file) from the user's "~/Library/Preferences" folder - perhaps it has become corrupted and preventing "System Preferences" from reading it, or there is some item common to both machines that the pref pane finds disagreeable. After removing the file, it will of course be necessary to re-add any login items.

  • Automator workflow to include/exclude startup items?

    Anyone know of an Automator workflow (or third-party app) that can easily include/exclude a startup item?
    I sometimes want an app to be a startup item and sometimes don't. So it would be convenient if I could just run a script to include/exclude it.
    Not critical... just for convenience sake.
    Any ideas?
    Thanks.

    Can you give us an example of some of the things you would like to do this with? I used to, for example use login items to mount the drive with my iTunes music. I stopped doing it that way and now mount the drive when iTunes launches. Depending upon whats being done perhaps a series of Automator actions could be used to create specific stings for specific tasks.

  • Startup items. what can i delete.

    i just took a look in my startup items. and this is what i have.
    BRESINKx86Monitoring
    CoreDuoTemp
    FanControlDaemon (this might be for quietMBP, if so i dont need it right since i use ShhMBP)
    HP IO
    HP Trap Monitor
    LexSleeperX
    PACESupport
    ShhMBP
    please tell me what i can delete because i dont need unneccessary items being started. Thank you.

    Those startup items were installed with third-party software you installed on your computer. You can remove all of them, but the software that depends upon them will no longer work.
    Why reward points?(Quoted from Discussions Terms of Use.)
    The reward system helps to increase community participation. When a community member gives you (or another member) a reward for providing helpful advice or a solution to their question, your accumulated points will increase your status level within the community.
    Members may reward you with 5 points if they deem that your reply is helpful and 10 points if you post a solution to their issue. Likewise, when you mark a reply as Helpful or Solved in your own created topic, you will be awarding the respondent with the same point values.

  • OSX 10.6 .8 -- Firefox automatically starts when I boot up (MacBook Pro Intel). It is not in the Startup Items in System Preferences, and automatic startup is not checked in Firefox Options. Don't know where else to look.

    How do I keep Firefox automatically starts when I boot up (OSX 10.6 .8 -- MacBook Pro Intel). It is not in the Startup Items in System Preferences, and automatic startup is not checked in Firefox Options.

    Hi fullrun-
    Once Firefox is open, you should be able to open the Right click context menu on the icon. From there you select 'Options' and then de-select 'Open at Login'. Hope that helps.

  • Library and Startup items folder

    Hello. I recently installed a driver for an EMI 2/6 (an old Emagic device) into my iBook which put itself in the startup items folder in the Library. It worked once but now it doesnt (Logic cant find the driver.) I was advised to try repairing permissions in the Startup Items folder. I now can only find the Library in the users folder; I cant find the other one and cant find the startup items folder either. Spotlight can find the startup items folder but I cant trace where its gone. Meanwhile I cant work and am missing OS9 badly. Have I messed with something I shouldnt have?

    If iTunes is in the Dock, just control-click on the icon and, if the "Open at Login" is checked, uncheck it. If iTunes is not in your Dock, go to the Accounts system preference, select your account and go to the Login Items tab. If iTunes is listed there, remove it.
    Regards.

  • I Have an "Insecure Startup Item disabled" problem and am at a loss

    Hi, I hope someone knows how to get around this in Snow Leopard?
    When I log into the profiles on the iMac it gives the message "Insecure Startup Item Disabled" with the other ""Library/Startupitems/RetroRun" has not been started because it does not have the proper security settings"
    Now I thought that RetroRun was a backup software used in OS9 ,OS 10.2 =>but not since OSX. Also I cannot locate said directory in the Library.
    Has anyone else had this issue or anything like it? Does anyone have a solution or some ideas that might shed some light on this for me please?
    Cheers
    Peter

    First off, there are two (ok, three) Library locations. The all users Library is at the hard drive root, and each user also has one. The System has the third, but that shouldn't be touched by mere mortals.
    These commands in Terminal should fix the issuesudo chown -R root:wheel /Library/StartupItems
    sudo chmod -R 0755 /Library/StartupItemsThese commands run on the all users Library.
    If you look at file paths, if they have an initial slash (/), that represents the hard drive itself. If they don't, it is a relative reference to where you are (usually your home folder which sits at /Users/)

  • Unable to open the photos in reviewer, every time I click on the photo on , it says do not have permission to view the photo. Please open the item in the finder choose the item and click on get info . What am I suppose to change in the setting on getinf

    Unable to open the photos in reviewer, every time I click on the photo on , it says do not have permission to view the photo. Please open the item in the finder choose the item and click on <get info>. What am I suppose to change in the setting on <get info>

    Back up all data.
    This procedure will unlock all your user files (not system files) and reset their ownership and access-control lists to the default. If you've set special values for those attributes on any of your files, they will be reverted. In that case, either stop here, or be prepared to recreate the settings if necessary. Do so only after verifying that those settings didn't cause the problem. If none of this is meaningful to you, you don't need to worry about it.
    Step 1
    If you have more than one user, and the one in question is not an administrator, then go to Step 2.
    Triple-click anywhere in the following line on this page to select it:
    { sudo chflags -R nouchg,nouappnd ~ $TMPDIR..; sudo chown -R $UID:staff ~ $_; sudo chmod -R u+rwX ~ $_; chmod -R -N ~ $_; } 2>&-
    Copy the selected text to the Clipboard by pressing the key combination command-C.
    Launch the built-in Terminal application in any of the following ways:
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
    ☞ Open LaunchPad. Click Utilities, then Terminal in the icon grid.
    Paste into the Terminal window by pressing command-V. I've tested these instructions only with the Safari web browser. If you use another browser, you may have to press the return key after pasting.
    You'll be prompted for your login password. Nothing will be displayed when you type it. You may get a one-time warning to be careful. If you don’t have a login password, you’ll need to set one before you can run the command. If you see a message that your username "is not in the sudoers file," then you're not logged in as an administrator.
    The command may take a few minutes to run, or perhaps longer if you have literally millions of files in your home folder. Wait for a new line ending in a dollar sign ($) to appear, then quit Terminal.
    Step 2 (optional)
    Take this step only if you have trouble with Step 1, if it frightens you, or if it doesn't solve the problem.
    Start up in Recovery mode. When the OS X Utilities screen appears, select
    Utilities ▹ Terminal
    from the menu bar. A Terminal window will open.
    In the Terminal window, type this:
    res
    Press the tab key. The partial command you typed will automatically be completed to this:
    resetpassword
    Press return. A Reset Password dialog will open. You’re not going to reset a password.
    In the dialog, select the startup volume ("Macintosh HD," unless you gave it a different name) if it's not already selected.
    Select your username from the menu labeled Select the user account if it's not already selected.
    Under Reset Home Directory Permissions and ACLs, click the Reset button.
    Select
     ▹ Restart
    from the menu bar.

  • HT1338 I need to delete an older version of Microsoft Database Daemon from the startup items before I can open Microsoft Outlook - how do i do this on my MacBook Pro Mac OSX Lion?

    I have received a message when trying to open Mirosoft Outlook on my Mac - tekking me to delete the Microsoft Database daemon from the startup Items - I do not know how to do this.

    Open the Users & Groups pane of System Preferences, click on your user account, and remove it from the list of login items.
    (66083)

  • New user - Opening a file on first login, then removing from startup items

    I'm trying to write a script to open a pdf welcoming a new user on an imaged mac. I've written the script "Welcome.app" below
    tell application "Preview"
    open "OS X Tiger:Users:Shared:Welcome.pdf"
    end tell
    do shell script "rm /Users/Shared/Welcome.app"
    I'm having problems with permissions this way. I've tried changing the user and group but no luck so far.
    It was suggested to me to try using "defaults write loginwindow etc" to
    remove the Welcome.app from the startup items, but I'm not sure if this is possible from the terminal.
    Any suggestions?
    Netrestore generic image   Mac OS X (10.4.6)  

    Create a second copy of the loginwindow.plist file in the User Template's Preferences folder with the name loginwindow.original.plist, and use the following two commands after the tell block:
    do shell script "mv ~/Library/Preferences/loginwindow.plist ~/.Trash/loginwindow.plist"
    do shell script "mv ~/Library/Preferences/loginwindow.original.plist ~/Library/Preferences/loginwindow.plist"
    The script will then disappear from the startup items, but will remain on the hard disk.
    (12565)

  • Slow down after upgrading OS, issue with Startup item

    Problem description:
    slow after updating OS
    EtreCheck version: 2.1.5 (108)
    Report generated January 14, 2015 at 10:45:00 PM EST
    Click the [Support] links for help with non-Apple products.
    Click the [Details] links for more information about that line.
    Click the [Adware] links for help removing adware.
    Hardware Information: ℹ️
      MacBook Pro (13-inch, Mid 2012) (Verified)
      MacBook Pro - model: MacBookPro9,2
      1 2.5 GHz Intel Core i5 CPU: 2-core
      4 GB RAM Upgradeable
      BANK 0/DIMM0
      2 GB DDR3 1600 MHz ok
      BANK 1/DIMM0
      2 GB DDR3 1600 MHz ok
      Bluetooth: Good - Handoff/Airdrop2 supported
      Wireless:  en1: 802.11 a/b/g/n
    Video Information: ℹ️
      Intel HD Graphics 4000
      Color LCD 1280 x 800
    System Software: ℹ️
      OS X 10.10.1 (14B25) - Uptime: 1:36:4
    Disk Information: ℹ️
      TOSHIBA MK5065GSXF disk0 : (500.11 GB)
      EFI (disk0s1) <not mounted> : 210 MB
      Recovery HD (disk0s3) <not mounted>  [Recovery]: 650 MB
      Macintosh HD (disk1) / : 498.88 GB (251.85 GB free)
      Core Storage: disk0s2 499.25 GB Online
      MATSHITADVD-R   UJ-8A8 
    USB Information: ℹ️
      Apple Inc. FaceTime HD Camera (Built-in)
      Apple Computer, Inc. IR Receiver
      Apple Inc. Apple Internal Keyboard / Trackpad
      Apple Inc. BRCM20702 Hub
      Apple Inc. Bluetooth USB Host Controller
    Thunderbolt Information: ℹ️
      Apple Inc. thunderbolt_bus
    Gatekeeper: ℹ️
      Mac App Store and identified developers
    Kernel Extensions: ℹ️
      /Library/Extensions
      [not loaded] org.virtualbox.kext.VBoxDrv (4.2.6) [Support]
      [not loaded] org.virtualbox.kext.VBoxNetAdp (4.2.6) [Support]
      [not loaded] org.virtualbox.kext.VBoxNetFlt (4.2.6) [Support]
      [not loaded] org.virtualbox.kext.VBoxUSB (4.2.6) [Support]
    Startup Items: ℹ️
      VirtualBox: Path: /Library/StartupItems/VirtualBox
      Startup items are obsolete in OS X Yosemite
    Launch Agents: ℹ️
      [loaded] com.google.keystone.agent.plist [Support]
      [loaded] com.oracle.java.Java-Updater.plist [Support]
      [not loaded] com.xamarin.mtvs.buildserver.plist [Support]
    Launch Daemons: ℹ️
      [loaded] com.adobe.fpsaud.plist [Support]
      [loaded] com.google.keystone.daemon.plist [Support]
      [loaded] com.oracle.java.Helper-Tool.plist [Support]
    User Launch Agents: ℹ️
      [loaded] com.adobe.ARM.[...].plist [Support]
      [not loaded] org.virtualbox.vboxwebsrv.plist [Support]
    User Login Items: ℹ️
      SpeechSynthesisServer Application (/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks /SpeechSynthesis.framework/Versions/A/SpeechSynthesisServer.app)
      EOS Utility ApplicationHidden (/Applications/Canon Utilities/EOS Utility/EOS Utility.app)
    Internet Plug-ins: ℹ️
      FlashPlayer-10.6: Version: 16.0.0.235 - SDK 10.6 [Support]
      Default Browser: Version: 600 - SDK 10.10
      AdobePDFViewerNPAPI: Version: 11.0.10 - SDK 10.6 [Support]
      AdobePDFViewer: Version: 11.0.10 - SDK 10.6 [Support]
      Flash Player: Version: 16.0.0.235 - SDK 10.6 Mismatch! Adobe recommends 16.0.0.257
      o1dbrowserplugin: Version: 5.38.6.0 - SDK 10.8 [Support]
      QuickTime Plugin: Version: 7.7.3
      googletalkbrowserplugin: Version: 5.38.6.0 - SDK 10.8 [Support]
      Unity Web Player: Version: UnityPlayer version 4.6.0f3 - SDK 10.6 [Support]
      DirectorShockwave: Version: 11.6.8r638 [Support]
      JavaAppletPlugin: Version: Java 7 Update 71 Check version
    User internet Plug-ins: ℹ️
      aliedit: Version: 1.0 - SDK 10.6 [Support]
    3rd Party Preference Panes: ℹ️
      Flash Player  [Support]
      Java  [Support]
      TeXDistPrefPane  [Support]
    Time Machine: ℹ️
      Time Machine not configured!
    Top Processes by CPU: ℹ️
          14% Dock
          14% com.apple.WebKit.Plugin.64
          5% WindowServer
          2% Safari
          2% com.apple.WebKit.Networking
    Top Processes by Memory: ℹ️
      210 MB com.apple.WebKit.WebContent
      146 MB softwareupdated
      125 MB Finder
      94 MB loginwindow
      90 MB Safari
    Virtual Memory Information: ℹ️
      57 MB Free RAM
      1.75 GB Active RAM
      1.73 GB Inactive RAM
      746 MB Wired RAM
      2.01 GB Page-ins
      5 MB Page-outs
    Diagnostics Information: ℹ️
      Jan 14, 2015, 09:09:58 PM Self test - passed
      Jan 14, 2015, 08:06:51 AM /Library/Logs/DiagnosticReports/com.apple.WebKit.Plugin.64_2015-01-14-080651_[r edacted].cpu_resource.diag [Details]

    Add more RAM or cut back on concurrent applications. Startup Item is irrelevant.
    Try these in order testing your system after each to see if it's back to normal:
    1. a. Resetting your Mac's PRAM and NVRAM
        b. Intel-based Macs: Resetting the System Management Controller (SMC)
    2. Restart the computer in Safe Mode, then restart again, normally. If this doesn't help, then:
    Boot to the Recovery HD: Restart the computer and after the chime press and hold down the COMMAND and R keys until the Utilities menu screen appears. Alternatively, restart the computer and after the chime press and hold down the OPTION key until the boot manager screen appears. Select the Recovery HD and click on the downward pointing arrow button.
    3. Repair the Hard Drive and Permissions: Upon startup select Disk Utility from the Utilities menu. Repair the Hard Drive and Permissions as follows.
    When the recovery menu appears select Disk Utility. After DU loads select your hard drive entry (mfgr.'s ID and drive size) from the the left side list.  In the DU status area you will see an entry for the S.M.A.R.T. status of the hard drive.  If it does not say "Verified" then the hard drive is failing or failed. (SMART status is not reported on external Firewire or USB drives.) If the drive is "Verified" then select your OS X volume from the list on the left (sub-entry below the drive entry,) click on the First Aid tab, then click on the Repair Disk button. If DU reports any errors that have been fixed, then re-run Repair Disk until no errors are reported. If no errors are reported click on the Repair Permissions button. Wait until the operation completes, then quit DU and return to the main menu. Select Restart from the Apple menu.
    4. Reinstall Yosemite: Reboot from the Recovery HD. Select Reinstall OS X from the Utilities menu, and click on the Continue button.
    Note: You will need an active Internet connection. I suggest using Ethernet if possible
                because it is three times faster than wireless.
    5. Reinstall Yosemite from Scratch:
    Be sure you backup your files to an external drive or second internal drive because the following procedure will remove everything from the hard drive.
    How to Clean Install OS X Yosemite
    Note: You will need an active Internet connection. I suggest using Ethernet if possible
                because it is three times faster than wireless.

Maybe you are looking for