Ubuntuボックスをよりおじいちゃんにやさしいものにするために、bashでスタートアップスクリプトを書きたいと思います。
スクリプトは次のようにする必要があります。
クロームを開くクロームが閉じるまで待つコンピュータの電源を切る
これまでのところ私は
#!/bin/bash
if [ -z "$1" ]; then
address="http:\\www.google.co.uk"
else
address=$1
fi
echo starting the internet
google-chrome $address
while [ 1=1 ];
do
grep_resp=$(ps aux | grep chrome)
if [ -z "$grep_resp" ]; then
echo turning computer off
else
echo chrome still running
fi
sleep 5
done
しかし、「chrome」のgrepはプロセスリストにあります
何か援助はありますか?