summaryrefslogtreecommitdiffstats
path: root/park-disk
blob: f92124df97554b1ccdec9dced74a06f575e755ed (plain)
1
2
3
4
5
6
#!/bin/bash
_sudo=''
[[ -z "$1" ]] && { echo "Usage: $(basename "$0") <device>"; exit 1; }
[[ ${UID} -ne 0 ]] && _sudo='sudo'

exec "${_sudo}" udisksctl power-off -b "$1"