個人用 Wiki で

MoinX を利用していたけど、起動できなくなってしまった。
http://moinx.antbear.org/ には

MoinX is no longer actively maintained since the author no longer uses the software. I suggest you go for the MoinMoin Desktop Edition which runs nicely on OS X. The added benifit is that upgrading later to a dedicated server is really trivial (2009-03-12).

ということで、DesktopEdition - MoinMoin を利用することに。


しかし、起動時に立ち上がってくれないのと、いちいち Terminal.app のウィンドウ使うのもあれなので、LaunchDaemon を使うことに。


DesktopEdition をダウンロードして
/Applications/MoinMoinDesktopEdition/ に設置。

/Library/LaunchDaemons/in.moinmoin.desktopedition.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>Disable</key>
    <false/>
    <key>GroupName</key>
    <string>staff</string>
    <key>Label</key>
    <string>in.moinmoin.desktopedition</string>
    <key>OnDemand</key>
    <false/>
    <key>ProgramArguments</key>
    <array>
        <string>/Applications/MoinMoinDesktopEdition/wikiserver.py</string>
    </array>
    <key>UserName</key>
    <string>user</string>
</dict>
</plist>
 $ sudo launchctl load /Library/LaunchDaemons/in.moinmoin.desktopedition.plist
 $ sudo launchctl start in.moinmoin.desktopedition  

これで、http://localhost:8080/ にアクセスして MoinMoin Wiki が使える。

UserName と GroupName は適当に設定しないと起動後すぐに落ちてしまう。
/var/log/system.log をみると root で起動すんな!! ということらしい。


Launchd に関しては http://www.maruko2.com/mw/LaunchDaemons_%28launchctl%2c_launchd%2eplist%29_%e3%81%ae%e4%bd%bf%e3%81%84%e6%96%b99 が詳しかった。