以下のとおりにshutdown-on-download-complete.sh
ファイルを作成しsudo bash shutdown-on-download-complete.sh
実行するとダウンロードが完了次第自動でシャットダウンします。
shutdown-on-download-complete.sh
source ~/.config/user-dirs.dirs
while [ -f $XDG_DOWNLOAD_DIR/*.crdownload ]
do
sleep 1
done
systemctl poweroff -i
メモ
wget https://gist.githubusercontent.com/GitHub30/e269254548fa9ef7eba43eb464f0e310/raw/0c012689c7a1aae1c6fa0522facaac4d1ea862a1/shutdown-on-download-complete.sh \
&& bash shutdown-on-download-complete.sh