Hi,
I'm trying to automate a relatively simple RAM disk script using launchd. The original script can be found here, except I also added the directories /private/tmp and /var/run. As Startup Items are not run as root and have been deprecated, I attempted to launch the script using a launchd plist.
launchd runs the script, but it continues to run it, creating multiple RAM disks until all memory is consumed (...). I have to manually unload the plist before memory runs out. How do I make launchd run the script just once?
I also have a second script to replace the soft links created by the RAM disk script with actual empty folders, otherwise the system kernel panics. It's intended to run only when the system shuts down; as such I have the script trapping the signal SIGTERM. But it doesn't work.
Can someone help me out? Thanks!
I'm trying to automate a relatively simple RAM disk script using launchd. The original script can be found here, except I also added the directories /private/tmp and /var/run. As Startup Items are not run as root and have been deprecated, I attempted to launch the script using a launchd plist.
launchd runs the script, but it continues to run it, creating multiple RAM disks until all memory is consumed (...). I have to manually unload the plist before memory runs out. How do I make launchd run the script just once?
I also have a second script to replace the soft links created by the RAM disk script with actual empty folders, otherwise the system kernel panics. It's intended to run only when the system shuts down; as such I have the script trapping the signal SIGTERM. But it doesn't work.
Can someone help me out? Thanks!