Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Use SystemStarter to restart system services System
Apple provides a program called SystemStarter which is used to start and stop scripts in the /System -> Library -> StartupItems and /Library -> StartupItems folders. You can use it to restart services like so:
 % sudo SystemStarter restart NetInfo
Or if you've just installed GimpPrint and need to restart CUPS for it to find your printer:
 % sudo SystemStarter restart PrintingServices
The one caveat is that all the start, stop, and restart options do is pass this argument to the various scripts. If the script doesn't respond to that argument, nothing happens. An example is AppServices, which controls coreservicesd. Sending stop or restart to this script has no effect.

Type man SystemStarter and browse through the various scripts to learn more about the program and the scripts.
  • Currently 2.40 / 5
  You rated: 4 / 5 (5 votes cast)

Use SystemStarter to restart system services | 8 comments | Create New Account
Click here to return to the 'Use SystemStarter to restart system services' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Authored by: thatch on Oct 03, '02 01:27:10PM

While the SystemStarter is a new feature of Jaguar and intended for the better, I have two problems with it which I can only surmize as somewhat buggy.

I use anacron to do maintenance tasks like the daily, weekly and monthly shell scripts without having to have the computer on during the wee hours like cron has to be unless you change the times to more regular hours. Anyway, anacron has a startup daemon that yields this message in my system log on every startup soon after it is originally called upon:

SystemStarter: Unable to load localization strings for /Library/StartupItems/daemonic-anacron

Whether or not this actually means that anacron is started or not is undeterminable by this message. But anacron will run on its own about every hour or so anyway so it's not that big of a problem. I have contacted the keeper of anacron and he replies that there is nothing new or changed that would invoke this error message so it must be something about the new OS that causes it. There are no localization strings in the program.

Another problem with SystemStarter is when a 'sudo shutdown now' command it issued to the terminal to quickly get into singel-user mode to run fsck or alter other file system and startup items. (I use Open Firmware Password to protect my computer from unauthorized attempts to boot it from CD's and such and cannot use the command-s startup to get into SUM so I must use the terminal method or disable Open Firmware Password to then be able to start with the command-s keys held down at startup. Even still, that is much quicker than booting from the 10.2 CD to run the disk utility.) The problem is, after successfully running fsck -y at the prompt, error messages pop up on the screen saying:

bootstrap_look_up() failed (ipc/send)invalid destination port

... and they continue about every 20 seconds or so. Then when I try to exit to Aqua by typing the previously available options like 'exit', 'bye' or 'restart', I get into an endless loop of errors that read:

bootstrap_look_up() failed (ipc/send)invalid destination port"
Welcome to MacIntosh...

System Starter: could not create ipc port ( 531 Hangup system starter -g ${VerboseF lag} ${safeboot}

login window [534]: *** assertion failure in -[login port juggler CreateSubset- BootstrapPort], LoginPortJuggler .m:290
login window [534]: *** uncaught exception:
<InternalInconsistencyException> Unable to create subset bootstrap port (error 268435459)

... and this continues about every 20 seconds or so and never returns me to a prompt so I am forced to do a hard restart to get out. I have also found, however, that typing 'reboot' or 'halt' will work to either continue boot into Aqua or shutdown respectively. But they must be done before any of the apparently incorrect commands, (restart, bye, exit), to work. Weird huh? Starting up with the command-s into SUM does not have these problems.

Not to take anything away from the hint as this may seem somewhat unrealted, but I thought worth mentioning. Hopefully, SystemStarter will be improved upon in future releases of the OS.

[ Reply to This | # ]
Authored by: Anonymous on Oct 03, '02 10:00:40PM

The first issue you speak of is pretty simple and nothing you need to worry about. StartupItems have the capacity to be localized. This one isn't and the system is getting a little fussy about it. If you create a resources folder in the anacron startupitem you can then localize the start, stop, restart console messages for the item into as many languages as you want. Check out some of the Apple startupitems in /Sysytem/Library/StartupItems/ for some examples. Do this and you won't see the message again.

The second issue is much more confusing. Potentially you are running into SystemStarter actually trying to shutdown the system and having an issue. All startup items should have a "stop" option to gracefully stop a service on system shutdown. Mostly this is just killing the process nicely and many third-party items don't have this, or perhaps you may have a misconfigured one. Just a thought.

[ Reply to This | # ]
Authored by: thatch on Oct 04, '02 02:47:19AM

Thanks for the suggestions. I agree that the anacron issue is nothing to worry about and isn't a big problem. But you gave me some ideas and I tried tinkering around with it a bit, but no luck. I've read the developer pages on SystemStarter and its associated files and then created the necessary directories and file, (/Library/StartupItems/daemonic-anacron/Resources/English.lproj/localizable.strings). And in the local file I've tried several things based on what I saw in /System/Library/StartupItems but I'm not certain about what is really correct. The file looks like this:

<?xml version="1.0" encoding="UTF-8"?>
<plist version="0.9">
<key>Starting timed execution services</key>
<string>Starting timed execution services</string>
<key>Stopping timed execution services</key>
<string>Stopping timed execution services</string>
<key>Restarting timed execution services</key>
<string>Restarting timed execution services</string>


I've substituted 'anacron', 'ancron services', 'ana(h)cronistic cron: anacron' and ''ana(h)cronistic cron: anacron services for 'timed execution services', (which is the way the file is constructed for cron) and I've also removed the '<services> and even tried adding '<anacron services>' to the end of the file but nothing stops the error, 'Unabel to load localization strings for /Library/StartupItems/daemonic-anacron'. Oh well. Can you think of anything else here?

The other problem with SUM is shared by some others as evidenced here:

and here:

... and I agree that it looks like SystemStarter is hanging up with the reboot or shutdown depending on the action specified. So, all I can do there is hope for it to be fixed in the next update. There have been bug reports filed. Does SUM from the terminal work for you?

[ Reply to This | # ]
SystemStarter was in OSX.1
Authored by: SonicMcTails on Oct 06, '02 01:31:05PM

I know SystemStarter was in10.1. It was different, and I don't think it could start/restart services, but I know it is there

[ Reply to This | # ]
Use SystemStarter to restart system services
Authored by: couzteau on Sep 29, '03 11:27:19AM

To restart WebObjects use the ServiceName rather than the path. This is also true for other Services!

SystemStarter restart "WebObjects Services"

Caution! There is a syntax error in the stop-script. to fix it follow the instructions here:

[ Reply to This | # ]
Use SystemStarter to restart system services
Authored by: jford00 on Oct 05, '05 02:00:48PM

Installing Cisco VPN 4.6.01 on OSX
Installed fine
Open Cisco VPN Client
Get error "Error 51: IPC socket allocation failed with error fffffffffffffch. This is most likely due to the Cisco Systems, Inc. VPN Service Not Being Started. Please Start the Service and Try again"

Open Terminal window
sudo SystemStarter restart CiscoVPN

now it is asking for a password?
I've tried the admin password, what gives?

[ Reply to This | # ]
Use SystemStarter to restart system services
Authored by: ennisdb on Oct 17, '05 09:04:25PM

I'm having the same problem. The Cisco VPN client works exactly one time before producing this error on the next attempt to secure a VPN. Anyone have some thoughts. I can uninstall/re-install and everything is fine, for one attempt, but this is an absurd solution.

[ Reply to This | # ]
Use SystemStarter to restart system services
Authored by: ennisdb on Oct 17, '05 09:15:50PM

I found this hint:

sudo /System/Library/StartupItems/CiscoVPN/CiscoVPN restart

Which seems to restart some aspect of the VPN, but I won't really *appreciate* doing this each time!

[ Reply to This | # ]