Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    mac


Advertisements:






Server V10.6 Snow Leopard :: Use Launchd To Run Shell Script At Boot?


I'm trying to create a plist file that will run a shell script at bootup of the server. I have the following xml so far in the plist file:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" [URL]
<plist version="1.0">
<dict>
<key>Disabled</key>
<false/>
<key>Label</key>
<string>com.apple.mymount</string>
<key>ProgramArguments</key>
<array>
<string>/mount-script/./mount.sh</string>
</array>
<key>RunAtLoad</key>
<true/>
</dict>
</plist>

The shell script is just a mount command:

#!bin/sh
#MOUNT folder X ON server Y
sudo -u _www mount_smbfs -f 777 -d 777 //username:password@server/folder /mnt/mount

The shell script works fine from the terminal. I can see the plist has loaded after bootup but the script doesn't run. what am I doing wrong?

Information:
Mac Mini Server
Mac OS X (10.6.2)


View 7 Replies (Posted: Mar 15, 2010)

Sponsored Links:

Related Forum Messages for Mac:
Server V10.6 Snow Leopard :: Can't Get Launchd To Run Shell Script As Root
I'm trying to run a very simple shell script on a regular basis to change permissions on files added to a group of folders on a server. I'm trying to set it up via launchd, since that's what Apple recommends, but when it runs, I get "operation not permitted" errors in the log, which I believe are caused by the script running as admin instead of root. I've tried adding the user variable "root" to the launchd plist, but when I load it that way, the log says it's ignored. Also, it doesn't load at boot. I can load it manually if I use launchctl load from the command line, but seems to run as admin instead of root.

Here's a copy of the launchd plist:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.mycompany.permissionsfix</string>
<key>ProgramArguments</key>
<array>
<string>sh</string>
<string>/usr/local/bin/permissionsfix</string>
</array>
<key>RunAtLoad</key>
<true/>
<key>StartInterval</key>
<integer>60</integer>
</dict>
</plist>

It's named "com.mycompany.permissionsfix" and lives in /Library/LaunchDaemons. I believe the permissions are correct (System r/w, Wheel r, Others r). I've verified the script works when called from the command line with sudo.

Other variables that may or may not matter: The folders being targeted live on a SAN volume shared by the server. Server is a current model Xserve, running 10.6.2 server.

Posted: Apr 2, 2010

View 4 Replies!   View Related
Software :: Run Shell Script Before Shutdown With Launchd?
Is there a way to run a shell script before shutdown with launchd? In 10.4, I have a shell script to remove user's folder when a user logs off. how to do a rc.shutdown in 10.5

Posted: Nov 17, 2008

View 1 Replies!   View Related
Snow Leopard :: Run Shell Script As Root On Boot
I have the need to run a shell script on boot up as root.It will not run as any other user because the software that the shell script runs requires root permissions, and I don't use my computer as root. I can't run it at login and use sudo because it would ask for a password and hang.How can I have the shell script auto-run at boot (or login) as root?

Information:
MacBook Pro 15" 2.66 Dual Core 4GB RAM
Mac OS X (10.6.3)

Posted: Jun 12, 2010

View 2 Replies!   View Related
Snow Leopard :: Run Shell Script In Automator
I have a python script I want to run in Automator (update_puzzles.py). I can get the script to run outside of Automator, in Terminal, by navigating to the right directory and typing "python update_puzzles.py". I must not be setting up Run Shell Script correctly. I have it set to /bin/bash and Pass Input to stdin. The command line simply reads python /pathname/update_puzzles.py (where pathname is the path to the .py file, which I got by dragging the file onto the Run Shell Script command window). There are no actions before this in my workflow and the action after is View Results. The log says Run Shell Script failed, and the error is "Traceback (most recent call last):"

Information:
imac
Mac OS X (10.6.2)

Posted: Mar 19, 2010

View 3 Replies!   View Related
Server V10.5 Leopard :: How To Run A Single Line Of Code On Boot
I have a single line of code that I need to run in Terminal every time I reboot my G5 server (the single line of code "turns on" my SVN server). How would I go about automating this on boot?

Information:
20" Intel iMac 2.16 Ghz, Macintosh SE/30
Mac OS X (10.6.2)
Xserves (Early 2009, Early 2008, G5), Mac Pro

Posted: Mar 31, 2010

View 1 Replies!   View Related
Server V10.6 Snow Leopard :: Auto Run Script For Server Application
Greetings..being totally chalenged wheh it comes to terminal commands and scripts, I am hoping someone can help me create a script which wil run the following terminal command which is needed to start up our accounts package server. I would like it to be something that runs if the Mac Server is rebooted, saving manually inputing the terminal command. At present i do the following:

cd /Applications/HansaWorld Enterprise

<then after entering the password>

./hansaworld &

How can I make this a script to run under login items please?

Posted: Sep 28, 2009

View 7 Replies!   View Related
Server V10.6 Snow Leopard :: How To Run Pear On My Mac Server
To run Pear on my Mac Server. I am building up a local Enviroment for Magento and need Pear running.

Posted: Jan 17, 2011

View 1 Replies!   View Related
Server V10.6 Snow Leopard :: Unable To Login To Server As Local Admin / DNS And OD Seem To Run Well
I've just set up a new 10.6.4 server using own dns service and as a OD Master. DNS and OD seem to run well. Problem is that i can't log in anymore to the servermachine using my local admin-account.

Information:
Mac Pro and others
Mac OS X (10.6.4)

Posted: Sep 29, 2010

View 1 Replies!   View Related
Server V10.6 Snow Leopard :: Run Fetchmail Via LaunchAgent As Local User On Server Startup?
Is it possible to run a Fetchmail.plist via LaunchAgent on server startup, even it is owned by a local user?
The fetchmail app should be run by the the user "collectmail". The necessary fetchmailrc is located in the home folder of "collectmail". Also the Fetchmail.plist has the owner permission set to "collectmail".

But when I look in console, it tells me "Dubious Ownership on file (skipping): /Library/LaunchAgents/Fetchmail.plist"

If I change permissions to my Admin account and save a fetchmailrc in my Admin home directory it works fine.

Can't I run the Fetchmail.plist which is owned by "collectmail", because it is not an administrator?

Information:
Mac OS X (10.6.4)
OSX Server

Posted: Oct 25, 2010

View 1 Replies!   View Related
Server V10.6 Snow Leopard :: Get Postgresql Server To Start-up / When Boot Server
I cannot figure out how to get my postgresql server to startup when you boot the server. The command to start postgres is /usr/local/pgsql/bin/postgres -D /usr/local/pgsql/data can someone tell me how to make this work?

Information:
macpro
Mac OS X (10.6.4)
10.6 server

Posted: Nov 11, 2010

View 1 Replies!   View Related
Server V10.6 Snow Leopard :: Can Run Mailsmith As A Service
I am running a Snow Leopard Server and was hoping to run my Mailsmith client as a service, so that it ran all the time regardless of who was logged in, if anybody, so I can process my mail at anytime. Currently I have to have a user logged in all the time to have it running. I use Mailsmith because it is the only product I know of that let's you download emails and strip the attachments off to a folder on the server. I use it in conjunction with a faxing service, so all my faxes get stored in a folder (as pdf's) and then I have a perl script that splits apart my multipage pdf's into single page items that can be stored as individual work orders and dumped into a database for storage and retrieval.

Posted: Nov 3, 2009

View 8 Replies!   View Related
Server V10.6 Snow Leopard :: Can Run Tomcat Behind Apache
a lot of applications, but I need Tomcat (and PHP and Python and CGI) running in parallel with Apache. For that, the out-of-the-box configuration in Snow Leopard is somewhat lacking.For anyone trying to set up a similar configuration, here's what I had to do. Hopefully it will save you some time and frustration.(1) Apache "pipes" JSP requests to Tomcat via the mod_jk module. So the first step is to enable mod_jk in the web settings under modules.(2) The /Library/Tomcat/conf/server.xml configuration is set up for standalone/remote service. The ports used by mod_jk (as defined in /etc/apache2/worker.properties) must match the ones in Tomcat, so the next step is to edit the server.xml file so that Apache and Tomcat are using the same port.

Information:
MacPro, PowerMac G5, PowerBook, MacMini, Xserve
Mac OS X (10.6.2)

Posted: Jan 29, 2010

View 1 Replies!   View Related
Server V10.6 Snow Leopard :: How To Run A Bash Script At Startup
I want a bash script to be run at startup (NOT logon), what's the best way to do that?

Information:
MacBook unibanzi
Mac OS X (10.6.2)

Posted: Jan 12, 2010

View 5 Replies!   View Related
Server V10.6 Snow Leopard :: Allowing Non Installed Programs To Run?
I'm trying to restrict what programs the students can use so I've restricted the programs they can launch but the problem is, is there are some that I need to run that aren't installed on the server. How do I allow these programs? Do I have to install every program on the server!

Information:
xserver
Mac OS X (10.6.5)

Posted: Nov 11, 2010

View 2 Replies!   View Related
Server V10.6 Snow Leopard :: Run Applescript Mounting Volume Over Afp
don't know if it is possible, but is there a way that when my users mount a certain volume i can have an applescript (that is located on the volume or elsewhere) run?

Information:
13" MacBook Pro, 2.53, 4GB
Mac OS X (10.6.2)

Posted: Oct 4, 2010

View 2 Replies!   View Related
Server V10.6 Snow Leopard :: How Do Automatically Run / Execute A Script On Shutdown
I have a Mac OS X 10.6 XServe. I am running FileMaker server on this which needs to close all databases and gracefully shut down before the actual machine is shut down. To do this is easy from the CLI: fmsadmin STOP -fI do not want to do this manually before every shut down so my question is: How do I make the above command to run automatically when the XServe is shut down?

Information:
XServe
Mac OS X (10.6.4)

Posted: Sep 15, 2010

View 3 Replies!   View Related
OS X Server V10.6 Snow Leopard :: Possible To Run Windows Account Software Program
I have snow leopard server working well for emails and web site but is it possible to install and run a windows accounts software programme on the server and access it over the web. If this is possible how would I do it.

Posted: Jun 21, 2012

View 5 Replies!   View Related
Server V10.6 Snow Leopard :: Apache DNS Cannot Run When Control Terminal Closes?
I log in to my Mac OS X Snow Leopard server (10.6.4) using SSH. I sudo -s to root and then I run "apachectl start" to start the HTTPD server. Right, no problem here. It starts and serves webpages without a problem.Right, but then I log out of SSH and my Apache Error.txt log files start filling up with this:could not lookup DNS configuration info service: (ipc/send) invalid destination port
Information:
Xserve Intel Dual Core
Mac OS X (10.6.4)

Posted: Dec 6, 2010

View 5 Replies!   View Related
Server V10.6 Snow Leopard :: VPN Network Access - Mac Pro Run As Router
Mac Pro running 10.5. server. Cable modem goes into ethernet port #1, ethernet #2 goes into a simple switch. So the mac pro runs as a router. It gives out .100 to .199 ip addresses through DHCP. Then it gives out .200 to .249 ip addresses through VPN. So when you connect to the server via VPN from out in the world, you get full access to the server (.1). But any time you try to connect to any other device on the network via IP, it times out. VPN to the server alone is still pretty useful, but isn't the whole point to get access to the whole network?

Information:
Mac Pro 2.66 / 6GB / 640GB - MacBook 2.4 / 4GB / 250GB
Mac OS X (10.5.7)

Posted: Feb 1, 2010

View 14 Replies!   View Related
Server V10.6 Snow Leopard :: Cannot Boot From Install CD - Need To Restart
I've a new Macbook Pro with Mac OS X 10.6 and I want to install Mac OS X server 10.6. Everytime I try to boot from the cd I got this error message: You need to restart your computer. Hold down the power button until it turns off, then press the power button again.

Information:
Macbook pro
Mac OS X (10.6.4)

Posted: Nov 1, 2010

View 6 Replies!   View Related
Server V10.6 Snow Leopard :: How To Start Program In OS X Boot
I think this should be an easy question. I want to start a program when osx boots, where can I configure it?

Information:
Mac Mini Server
Mac OS X (10.6)

Posted: Nov 30, 2010

View 1 Replies!   View Related
Server V10.6 Snow Leopard :: Mount SMB Shares On Boot
We have two Mac servers running Snow Leopard. Server "Alice" must statically mount a SMB/CIFS share located on remote server "Bob" for a particular local user "_www" at boot — not on login. I've seen plenty of solutions for mounting a share when a particular user logs in, but this is a server and services must run without user attendance. I've also seen dynamic automount solutions that mount the share when a user attempts to access something under the mount point, but this is also unacceptable because the mounted file system must be available strictly prior to any access attempts.

I come from a *nix world where the solution to this problem is a single line in /etc/fstab containing the necessary mount options, as follows:

//Bob/foo /path/to/mount/point smbfs username=remotename,password=remotepass,uid=_www 0 0

The answer to this question will provide an equivalent method of accomplishing exactly this on Snow Leopard Server. .

Information:
Mac OS X (10.6.4)

Posted: Oct 8, 2010

View 2 Replies!   View Related
OS X Leopard :: Pass Video File Name To Run Shell Script
Trying to make an automator script that will 1. Start a video capture, 2. Stop video capture, 3. Rename video, 4. Run Shell Script. Here is the shell script:

for f in "$@"
do
echo "$f"
/usr/bin/podcast --server my.podcast.server --user myself --pass mypass --submit --file $f --workflow "my workflow" --metadata /path/to/file
done

Do I need to create a variable in the automator script to pass it to the script? If I need the variable do I also need to use both Set Value of Variable and Get Value of Variable? If I don't need a variable does $f need quotes around them?

Information:
Quad G5
Mac OS X (10.4.9)

Posted: Jan 29, 2009

View 3 Replies!   View Related
Server V10.6 Snow Leopard :: Network Mac To Boot From NetInstall Image?
I want a Mac on my network to boot from a NetInstall image but I don't want it to install automatically. I want to be able to sit at the client and go through the install as if the install DVD was in the drive. Does NetInstall automate the process or can I walk it through it like normal? (I know it is possible to automate it, I guess I'm just wondering if automated is the default way...)

Information:
Mac Mini 1.66 Core Duo 2GB Server, MacBook Pro 15" (Santa Rosa)
Mac OS X (10.6.4)

Posted: Jul 1, 2010

View 3 Replies!   View Related
Mac Mini :: Run Snow Leopard (not Server) On Server Model?
I'd like the server model mostly because of the two 500 gb hard drives Can I run Snow Leopard on it instead of server? Or, can I run the sever OS but simply use it normally?

Information:
MacBook Pro 2.53 ghz
Mac OS X (10.4.9)
power books, minis, MacBook Pro 2.16, MacBook, etc.

Posted: Nov 27, 2010

View 29 Replies!   View Related
Server V10.6 Snow Leopard :: Mac Mini Won't Boot - System Crashed
my wife was using our Mac Mini server and switched users and the system crashed. When we went to restart it it just sits on the Apple logo and the time wheel. I have tried using the disc utility on my install disc but that didn't help. Unfortunately I don't have a backup. What do I need to do? Can I reinstall with out wiping all my data?

Information:
Macmini3,1
Mac Mini Server

Posted: Apr 10, 2010

View 8 Replies!   View Related
Server V10.5 Leopard :: Run Bootcamp / Mac Fusion On Local Machines On My Server?
Is it possible to run bootcamp or mac fusion on local machines running on my server? If so how would I allow the applications to run on the server?

Information:
Imac
Mac OS X (10.5.8)

Posted: Jan 6, 2010

View 1 Replies!   View Related
Server V10.5 Leopard :: Wants To Re-run The Server Setup Assistant?
I have a G5 tower with OS X Leopard Server installed. I made some rookie mistakes (such as not setting up DNS) during the initial Server Setup Assistant wizard so I would like to give it a try again. However, I already have a lot of files on the server that I don't want to lose. In the past, I have had to reinstall the server software but when I did, it only wants to do an erase and install. There is no opportunity to archive and install so I can save my data and just redo the server setup.

Further reasons to do this are tonight I discovered that all of my users were gone, including the admin user. I searched the threads and found that I could login as username "Local Administrator" with the password of the previous admin account. I then tried to use the Workgroup manager to add all the users back. I can at least now let the clients log in and access the AFP shared folder that is stored there but I'm getting a log of strange errors with other things. For example, on a fresh client, I used to be able to fire up Directory Utility and have the client automatically configure a few things to work with the server such as Time Machine. Unfortunately, now when I try this I get an error.

Therefore, if someone can tell me if there is a way to blow out the existing server configuration and redo it from scratch.

Information:
Power Mac G5 2.0 GHz
Mac OS X (10.5.8)
3GB RAM

Posted: Oct 22, 2009

View 6 Replies!   View Related
Snow Leopard :: Quit Launchd Application - Cannot Restart IMac
Today I quit the launchd application. Now I am totally screwed. Nothing is working. All I see is the desktop background...no dock, no HD, I can't start apps with quicksilver, nothing. I have tried to restart the machine but nothing seems to work.

Information:
iMac
Mac OS X (10.6)
27" 4g ram, 2.9 gig

Posted: Nov 9, 2009

View 2 Replies!   View Related
Snow Leopard :: How To Learn - A Script Is Called Each Night - Cron - Launchd?
I have an AppleScript that runs every night like clockwork, it is great, however I can't remember what I did to make that happen. I started it about a year ago when the computer in question was running 10.5, it is now running 10.6. I'm guessing that the script is called via launchd or cron, but I did a more of /etc/crontab and it didn't have anything in it so I'm guessing cron isn't it (plus I know it is deprecated). So if it is launchd that calls the AppleScript every night, how can I query launchd to confirm?

Posted: Dec 4, 2009

View 6 Replies!   View Related
Server V10.5 Leopard :: Why Server Boot Disk Suddenly Shows Full
It has 7.46Gb left, but a few days ago it had 41.96Gb of free space, and no one has touched the server, no one has even been in the office!I looked at the disk and let it calculate folder sizes to see if there was any obvious increase, including invisible files, but the folder sizes dont add up to the 48 Gb used space that is reported in the get info window.

Information:
Macbook Pro 2.16 Ghz 2Gb RAM
Mac OS X (10.5)

Posted: Nov 21, 2010

View 3 Replies!   View Related
Snow Leopard :: Boot Drive Died - Any Way To Run Disk Utility?
My boot drive in my Mac Pro just died (blue screen of death) But I have it back up and running with a bootable copy that I made of that drive, my question is, I would like to see if I could somehow mount this dead drive to see if I run disk utility on it, When I put it in the drive bay with the bootable copy I have running now, on startup, it just goes back to the blue screen, any tips on how to do this.

Information:
Mac Pro 2.26 Ghz
iMac 24" 2.8Ghz
Powermac G4 Quicksilver 2002
Mac OS X (10.5.6)

Posted: Dec 1, 2009

View 6 Replies!   View Related
OS X :: Full Pathname To Run Shell Script?
I'm trying to create a shell script or compile it into an application using automator that runs a JAR file. Everything works great except that I have to specify the full pathname in the shell script. I thought that ./ or .../ or something similar would denote that I want to run the .JAR file that is in the containing folder but I'm not having any luck.

Posted: Oct 3, 2010

View 7 Replies!   View Related
OS X :: Run Two Things Simultaneously Via One Shell Script?
Can you run two things simotaniously via one shell script?

Posted: Apr 17, 2009

View 1 Replies!   View Related
Server V10.6 Snow Leopard :: VPN Server In Snow Leopard Server Not Accepting Connections
I've got some issues with a new Snow Leopard Server, running on a Mac mini Server, and VPN.

I have a Linksys WRT310N performing router duties. I have enabled the VPN Passthrough in the router's configuration pages (IPSec, PPTP and L2TP all Enabled). In the Applications and Gaming section, I have enabled ports 1723 (TCP and UDP) and 1701 (TCP and UDP) to go through to the mini Server. In order to have the VPN Passthrough enabled, I have to have the SPI Firewall enabled on the router.

I have both PPTP and L2TP enabled on the Server. When I first tested it, everything worked.

Within 24 hours, it stopped working, and I can't work out why.

On the Server, I can see in the logs the following messages: (server name and IPs changed to protect the guilty)

---BEGIN vpnd.log---
2009-11-03 20:03:32 ESTIncoming call... Address given to client = 192.168.0.213
Tue Nov 3 20:03:32 2009 : Directory Services Authentication plugin initialized
Tue Nov 3 20:03:32 2009 : Directory Services Authorization plugin initialized
Tue Nov 3 20:03:32 2009 : PPTP incoming call in progress from '123.456.789.123'...
Tue Nov 3 20:03:33 2009 : PPTP connection established.
Tue Nov 3 20:03:33 2009 : using link 0
Tue Nov 3 20:03:33 2009 : Using interface ppp0
Tue Nov 3 20:03:33 2009 : Connect: ppp0 <--> socket34:17
Tue Nov 3 20:03:33 2009 : sent LCP ConfReq id=0x1 <asyncmap 0x0> <auth chap MS-v2> <magic 0x38278225> <pcomp> <accomp>
Tue Nov 3 20:03:33 2009 : rcvd LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x4e96b584> <pcomp> <accomp>
Tue Nov 3 20:03:33 2009 : lcp_reqci: returning CONFACK.
Tue Nov 3 20:03:33 2009 : sent LCP ConfAck id=0x1 <asyncmap 0x0> <magic 0x4e96b584> <pcomp> <accomp>
Tue Nov 3 20:03:36 2009 : sent LCP ConfReq id=0x1 <asyncmap 0x0> <auth chap MS-v2> <magic 0x38278225>

Posted: Feb 25, 2010

View 12 Replies!   View Related
Server V10.6 Snow Leopard :: Snow Leopard Server Mail Service Is Adding Www. In The Front Of Domain?
I have recently purchased Mac Mini with SL Server on it. I have been trying to get mail services working. I can now receive emails from outside my network..however when I send emails to some one the server is adding www in front of the domain....([URL]

Information:
Mac Mini
Mac OS X (10.6.2)
Snow Leopard Server

Posted: Jan 7, 2010

View 6 Replies!   View Related
OS X Technologies :: Folder Action To Run A Shell Script
I want to create a Folder Action to run the following shell script on all files with extension .vcs: 

sed '1d' >reminder.ics 

The job of the Folder Action is to take any Calendar item files downloaded from TVGuide.co.uk, remove the first line and then save them as .ics files.  The reason for this is that the files are automatically generated with a carriage return on the first line, which BusyCal (being strict about these things) doesn't like.  It then rejects the whole file. 

I have tried doing this with Automator but the result didn't work. 

If it's possible to have the Folder Action retain the original file name (ie. everything pre-extension) that'd be a bonus. 

Info:
Mac mini (Mid 2011), Mac OS X (10.7.4)

Posted: Aug 7, 2012

View 4 Replies!   View Related
Server V10.5 Leopard :: Getting Kerberos To Run In A .local Domain?
I am trying to set up a Mac 10.5.8 Server as an Open Directory Master and utilize Kerberos. Unfortunately, I am running into nothing but problems. I am in a primarily Windows environment that is running a Windows 2003 AD domain. All DNS is handled by the Windows servers. Unfortunately, the AD domain is set up as "domainname.local" and it is not an option to rename it. My Mac server is correctly set up in DNS as "macsrv01.domainname.local". The server was set up as "Advanced Server".

Information:
MacBook Pro
Mac OS X (10.6.5)

Posted: Feb 9, 2011

View 7 Replies!   View Related
Server V10.6 Snow Leopard :: The Server At Mac OS X Server Web Services Requires A Username And Password?
I am running SL Server 10.6.2, wiki works but when a person clicks an attached file in a wiki and then selects "open" they get a login popup with the notification The server at Mac OS X Server Web Services requires a username and password. It doesn't matter what they put into the login/pass it comes back. If they hit cancel then the document opens. If they click save then it saves with no issue. I can type in the admin login/pass of the server and it works. Does this mean the security settings to the location of the files is wrong? ation:
XServe
Mac OS X (10.6.2)

Posted: Feb 10, 2010

View 1 Replies!   View Related
Copyright 2005-08 www.BigResource.com, All rights reserved