You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
jumpserver/entrypoint.sh

26 lines
431 B

#!/bin/bash
function cleanup()
{
local pids=`jobs -p`
if [[ "${pids}" != "" ]]; then
kill ${pids} >/dev/null 2>/dev/null
fi
}
action="${1-start}"
service="${2-all}"
trap cleanup EXIT
rm -f /opt/jumpserver/tmp/*.pid
if [[ "$action" == "bash" || "$action" == "sh" ]];then
bash
elif [[ "$action" == "sleep" ]];then
echo "Sleep 365 days"
sleep 365d
else
python jms "${action}" "${service}"
fi