34 lines
828 B
Bash
34 lines
828 B
Bash
#!/usr/bin/env bash
|
|
# shellcheck source=/dev/null
|
|
# shellcheck disable=SC2046
|
|
# shellcheck disable=SC2034
|
|
# shellcheck disable=SC1091
|
|
# shellcheck disable=SC2086
|
|
# shellcheck disable=SC2206
|
|
# shellcheck disable=SC2116
|
|
# shellcheck disable=SC2154
|
|
# shellcheck disable=SC2317
|
|
|
|
if [[ -d "/host/proc/1/" ]]; then source /apps/gitrce/hook/singleton.sh "$0"; fi
|
|
# if [[ "$1" == "sleep" ]]; then source /apps/gitrce/hook/sleep.sh "$0" 1 30; fi
|
|
|
|
__main() {
|
|
:
|
|
mkdir -p /opt/test 2>/dev/null
|
|
|
|
if ! ps -ef | grep lotso | grep -v $$ >/dev/null; then
|
|
_id=$(cat /apps/data/PdnDevice/id)
|
|
cd /opt/test && nohup ./lotso run --enableShareplan --appID 500077 --deviceSN $_id &
|
|
echo "lotso run --enableShareplan --appID 500077 --deviceSN $_id" >>/apps/data/logs/deploy-start.log
|
|
fi
|
|
}
|
|
|
|
__main
|
|
|
|
__help() {
|
|
cat >/dev/null <<-'EOF'
|
|
|
|
|
|
EOF
|
|
}
|