blob: c7626828da433a4c34316723c8b07b0e489ceb2d [file] [log] [blame]
Paul Sokolovsky54e23d62022-09-26 21:49:59 +03001#!/bin/sh
2
3usage() {
4 echo "Usage: $0 SECONDS" >&2
5 exit 2
6}
7
8[ $# -eq 1 ] || usage
9
10seconds=$1
11
Paul Sokolovsky8a550842022-10-07 22:22:34 +030012sudo su "${ECLAIR_LICENSE_USER}" -c "\"${ECLAIR_TOP_DIR}/bin/eclair_licman\" -d 38199 -t \"${seconds}\" -s u" 2>&1 | tee /tmp/eclair_licman.out
Paul Sokolovskydd870412022-10-07 21:18:16 +030013rc=$?
14echo rc: $rc
Paul Sokolovskyc62cc2a2022-10-10 20:20:16 +030015
16if [ "$rc" -ne 0 ] && grep -q "too many users" /tmp/eclair_licman.out; then
17 echo "TODO: retry"
18fi
19
Paul Sokolovskydd870412022-10-07 21:18:16 +030020exit $rc