mirror of
https://github.com/Yubico/yubikey-val.git
synced 2025-02-27 06:54:16 +01:00
23 lines
299 B
Plaintext
23 lines
299 B
Plaintext
|
#!/bin/bash
|
||
|
|
||
|
# Something to keep ykval-queue going
|
||
|
# run this in cron
|
||
|
# restarts if necessary
|
||
|
|
||
|
RUNAS=ykval
|
||
|
|
||
|
function start
|
||
|
{
|
||
|
su -s /bin/bash -c '/usr/sbin/ykval-queue &>/dev/null &' - ${RUNAS}
|
||
|
exit 0
|
||
|
}
|
||
|
|
||
|
|
||
|
FOUND=$( ps -C ykval-queue | wc -l )
|
||
|
|
||
|
if [[ ${FOUND} -lt 2 ]]; then
|
||
|
start
|
||
|
fi
|
||
|
|
||
|
exit 0
|