2023-12-08 17:33:11 +01:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
if [ -z "${*}" ]; then
|
|
|
|
echo ":: Error: No command supplied"
|
|
|
|
exit 1
|
|
|
|
fi
|
2024-06-03 10:01:06 +02:00
|
|
|
if [ -a "/tmp/jobrunner" ] && [ ! -d "/tmp/jobrunner" ]; then
|
|
|
|
echo ":: Error: \"/tmp/jobrunner\" is not a directory, aborting."
|
2023-12-08 17:33:11 +01:00
|
|
|
else
|
2024-06-03 10:01:06 +02:00
|
|
|
if [ ! -f "/tmp/jobrunner/jobrunner.pid" ]; then
|
2023-12-08 17:33:11 +01:00
|
|
|
echo ":: Error: The jobrunner daemon is not running."
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
fi
|
2024-06-03 10:01:06 +02:00
|
|
|
echo "${@}" &> "/tmp/jobrunner/jobrunner.cmd"
|