register assy tests PID after LOCK checked otherwise launcher PID is always rewritten after an ssh login

This commit is contained in:
Vincent-FK 2021-01-04 18:17:30 +01:00
parent 9caf05fe1c
commit e07f2428b4

View File

@ -1,9 +1,5 @@
#!/bin/sh #!/bin/sh
## Register ourself as the running FunKey task for receiving USR1
## signal for shutting down
echo $$ > "/var/run/funkey.pid"
## Check if tests must be run ## Check if tests must be run
RUN_ENV_VAR=$(fw_printenv -n assembly_tests 2>/dev/null) RUN_ENV_VAR=$(fw_printenv -n assembly_tests 2>/dev/null)
if [ "x${RUN_ENV_VAR}" != "x1" ]; then if [ "x${RUN_ENV_VAR}" != "x1" ]; then
@ -20,6 +16,10 @@ if [ -f ${LOCK_FILE} ]; then
fi fi
touch ${LOCK_FILE} touch ${LOCK_FILE}
## Register ourself as the running FunKey task for receiving USR1
## signal for shutting down
echo $$ > "/var/run/funkey.pid"
## Binaries ## Binaries
PROD_SCREEN_BIN="/usr/local/sbin/funkey_prod_screens" PROD_SCREEN_BIN="/usr/local/sbin/funkey_prod_screens"
GET_PROC_UID="/usr/local/sbin/get_sid" GET_PROC_UID="/usr/local/sbin/get_sid"