Running a Command on Shut Down

Discussion in 'macOS' started by gtr053, Feb 8, 2011.

  1. gtr053 macrumors member

    Joined:
    Jan 2, 2010
    Location:
    Tuscaloosa, AL
    #1
    I did a brief search on this but all I found was how to run shut down the computer via Terminal. What I want to do is run one command when the computer is shut down or when I log out of my account.

    I use Automator to enable journaling on my HDD on login. However, I don't know how to disable journaling on log off/shut down. I want to do this so that I can write access when using Ubuntu, which I dual boot with.

    I suppose I could make an application through Automator to click on that will both disable the journal and shut down the computer but I'd really like to not have to do that.
     
  2. Hal Itosis macrumors 6502a

    Hal Itosis

    Joined:
    Feb 20, 2010
    #2
    >>Running a Command on Shut Down

    Last time i checked, creating a /etc/rc.shutdown.local file and putting (shell) commands in there worked really well. [google on "/etc/rc.shutdown.local" for more info.]
     
  3. gtr053 thread starter macrumors member

    Joined:
    Jan 2, 2010
    Location:
    Tuscaloosa, AL
    #3
    I looked into it and it looks like exactly what I need. I won't post again if it works. Thanks.
     

Share This Page