Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision | |||
docs:mac:builds:mediatomb [2008/08/09 01:11] – billh | docs:mac:builds:mediatomb [2008/09/07 00:27] (current) – billh | ||
---|---|---|---|
Line 92: | Line 92: | ||
sudo chown -R nobody: | sudo chown -R nobody: | ||
</ | </ | ||
- | * create a Mac StartupItem, | + | * create a Mac StartupItem, |
- | start: | + | #!/bin/sh |
- | sudo -u nobody /usr/local/bin/mediatomb --daemon --home /usr/local --cfgdir mediatomb --logfile / | + | |
- | stop: | + | ## |
- | sudo killall -15 mediatomb | + | # Configure MediaTomb Server |
+ | ## | ||
- | restart: | + | . / |
- | sudo killall -1 mediatomb | + | |
+ | StartService () | ||
+ | { | ||
+ | if [ " | ||
+ | ConsoleMessage " | ||
+ | now=`date +%s` | ||
+ | let "limit = $now + 60" | ||
+ | |||
+ | / | ||
+ | while [ $? -ne 0 ] && [ $now -lt $limit ] | ||
+ | do | ||
+ | let "now = `date +%s`" | ||
+ | if [ $now -ge $limit ]; then | ||
+ | ConsoleMessage " | ||
+ | exit 1 | ||
+ | fi | ||
+ | |||
+ | / | ||
+ | done | ||
+ | |||
+ | sudo -u nobody / | ||
+ | fi | ||
+ | |||
+ | } | ||
+ | |||
+ | StopService () | ||
+ | { | ||
+ | ConsoleMessage " | ||
+ | sudo killall -15 mediatomb | ||
+ | } | ||
+ | |||
+ | RestartService () | ||
+ | { | ||
+ | if [ " | ||
+ | ConsoleMessage " | ||
+ | sudo killall -1 mediatomb | ||
+ | else | ||
+ | StopService | ||
+ | fi | ||
+ | |||
+ | } | ||
+ | |||
+ | RunService " | ||
</ | </ | ||
===== Future Development ===== | ===== Future Development ===== | ||
* :?: Note: may also build with libjs, libmagic, id3lib, taglib | * :?: Note: may also build with libjs, libmagic, id3lib, taglib |