mirror of
https://github.com/ansible/awx.git
synced 2026-05-09 10:27:37 -02:30
Fix awx-autoreload in dev environment (#14968)
Fix awx-autoreload, recent change made autoreload no longer take the command parameter
This commit is contained in:
@@ -1,8 +1,8 @@
|
|||||||
#!/bin/env bash
|
#!/bin/env bash
|
||||||
|
|
||||||
if [ $# -lt 2 ]; then
|
if [ $# -lt 1 ]; then
|
||||||
echo "Usage:"
|
echo "Usage:"
|
||||||
echo " autoreload directory command"
|
echo " autoreload directory"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -13,7 +13,6 @@ inotifywait -mrq -e create,delete,attrib,close_write,move --exclude '(/awx_devel
|
|||||||
since_last=$((this_reload-last_reload))
|
since_last=$((this_reload-last_reload))
|
||||||
if [[ "$file" =~ ^[^.].*\.py$ ]] && [[ "$since_last" -gt 1 ]]; then
|
if [[ "$file" =~ ^[^.].*\.py$ ]] && [[ "$since_last" -gt 1 ]]; then
|
||||||
echo "File changed: $file"
|
echo "File changed: $file"
|
||||||
# if SUPERVISOR_CONFIG_PATH is defined run `supervisorctl -c $SUPERVISOR_CONFIG_PATH` else just run `supervisorctl`
|
|
||||||
if [ -n "$SUPERVISOR_CONFIG_PATH" ]; then
|
if [ -n "$SUPERVISOR_CONFIG_PATH" ]; then
|
||||||
supervisorctl_command="supervisorctl -c $SUPERVISOR_CONFIG_PATH"
|
supervisorctl_command="supervisorctl -c $SUPERVISOR_CONFIG_PATH"
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user