Mac/launchd
をテンプレートにして作成
[
トップ
] [
新規
|
一覧
|
検索
|
最終更新
|
ヘルプ
|
ログイン
]
開始行:
RIGHT:[[Mac 関係覚え書き]]
Apple Developer Connection の記事
-[[Getting Started with launchd:http://developer.apple.co...
----
*Launchd のスクリプト作成例1 [#e20dbd18]
Launchd を利用してログイン時に Symantec AntiVirus
ウイルス定義ファイルを更新する.
-1 /etc/symliveupdate.sh スクリプトを作成.
内容は,
#!/bin/sh
LANG=C; export LANG
DATE=`date +%s`
UPDATE_INTERVAL=7
# 次の 2行は実際には 1行
UPDATED=`find /Library/Application\ Support/Symantec/Liv...
-name liveupdt.log -a -mtime -${UPDATE_INTERVAL} | wc -l`
if [ ${UPDATED} -ne "0" ]
then
exit 0
fi
# 次の 2行は実際には 1行
/Library/Application\ Support/Norton\ Solutions\ Support...
LiveUpdate.app/Contents/MacOS/LiveUpdate -update LUal \
-liveupdatequiet YES -liveupdateautoquit YES > /dev/null...
-2 /Library/LaunchAgents/SymLiveUpdate.plist を作成
この部分は Lingon http://lingon.sourceforge.net/ を利用し...
するのが簡単.
Lingon の使い方は,実際に使ってみれば説明しなくても何とな...
内容は,
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0...
<plist version="1.0">
<dict>
<key>Label</key>
<string>SymLiveUpdate</string>
<key>ProgramArguments</key>
<array>
<string>/etc/symliveupdate.sh</string>
</array>
<key>RunAtLoad</key>
<true/>
</dict>
</plist>
終了行:
RIGHT:[[Mac 関係覚え書き]]
Apple Developer Connection の記事
-[[Getting Started with launchd:http://developer.apple.co...
----
*Launchd のスクリプト作成例1 [#e20dbd18]
Launchd を利用してログイン時に Symantec AntiVirus
ウイルス定義ファイルを更新する.
-1 /etc/symliveupdate.sh スクリプトを作成.
内容は,
#!/bin/sh
LANG=C; export LANG
DATE=`date +%s`
UPDATE_INTERVAL=7
# 次の 2行は実際には 1行
UPDATED=`find /Library/Application\ Support/Symantec/Liv...
-name liveupdt.log -a -mtime -${UPDATE_INTERVAL} | wc -l`
if [ ${UPDATED} -ne "0" ]
then
exit 0
fi
# 次の 2行は実際には 1行
/Library/Application\ Support/Norton\ Solutions\ Support...
LiveUpdate.app/Contents/MacOS/LiveUpdate -update LUal \
-liveupdatequiet YES -liveupdateautoquit YES > /dev/null...
-2 /Library/LaunchAgents/SymLiveUpdate.plist を作成
この部分は Lingon http://lingon.sourceforge.net/ を利用し...
するのが簡単.
Lingon の使い方は,実際に使ってみれば説明しなくても何とな...
内容は,
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0...
<plist version="1.0">
<dict>
<key>Label</key>
<string>SymLiveUpdate</string>
<key>ProgramArguments</key>
<array>
<string>/etc/symliveupdate.sh</string>
</array>
<key>RunAtLoad</key>
<true/>
</dict>
</plist>
ページ名: