summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
fa9ddad)
Bourne shell seems to only accept 1 as truthy
if [ $(pgrep -c lock.${HOSTNAME}) -gt 1 ]; then
pkill -f "$NAG_MSG"
$LOCK_CMD
if [ $(pgrep -c lock.${HOSTNAME}) -gt 1 ]; then
pkill -f "$NAG_MSG"
$LOCK_CMD
-elif gpg --card-status >/dev/null 2&>1; then
- swaynag -m "$NAG_MSG" --type warning
+ gpg --card-status > /dev/null
+ if [ $? -ne 2 ]; then
+ gpg --card-status
+ echo $?
+ swaynag -m "$NAG_MSG" --type warning
+ else
+ $LOCK_CMD
+ fi